Skip to content

Commit

Permalink
fix groupByKeys bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cyyeh committed Jul 10, 2024
1 parent 6eca8a9 commit 68c9f5d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions wren-ai-service/src/pipelines/sql_explanation/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ def _compose_sql_expression_of_filter_type(filter_analysis: Dict) -> str:
return ""


def _compose_sql_expression_of_groupby_type(groupby_keys: List[List[str]]) -> List[str]:
return [f"{','.join(groupby_key)}" for groupby_key in groupby_keys]
def _compose_sql_expression_of_groupby_type(
groupby_keys: List[List[dict]],
) -> List[str]:
return [
", ".join([expression["expression"] for expression in groupby_key])
for groupby_key in groupby_keys
]


def _compose_sql_expression_of_relation_type(relation: Dict) -> List[str]:
Expand Down

0 comments on commit 68c9f5d

Please sign in to comment.