From 692fb945fe0d5a9cdc8542b2a0886bbeb92ab22a Mon Sep 17 00:00:00 2001 From: qinxuye Date: Tue, 19 Sep 2023 19:57:25 +0800 Subject: [PATCH] Support q06 --- xorbits_sql/executor.py | 2 +- xorbits_sql/tests/test_tpc_h.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xorbits_sql/executor.py b/xorbits_sql/executor.py index 2aa0fbb..852aa99 100644 --- a/xorbits_sql/executor.py +++ b/xorbits_sql/executor.py @@ -355,7 +355,7 @@ def aggregate( if step.group: result = df.groupby(group_by).agg(**aggregations).reset_index() else: - result = df.agg(**aggregations) + result = df.agg(**aggregations).reset_index(drop=True) result.columns = names else: assert len(group_by) == len(names) diff --git a/xorbits_sql/tests/test_tpc_h.py b/xorbits_sql/tests/test_tpc_h.py index 0be2a08..3d8aaa0 100644 --- a/xorbits_sql/tests/test_tpc_h.py +++ b/xorbits_sql/tests/test_tpc_h.py @@ -54,7 +54,7 @@ def _to_csv(expression: exp.Expression) -> exp.Expression: def test_execute_tpc_h(prepare_data): conn, sqls = prepare_data - for sql, _ in sqls[:5]: + for sql, _ in sqls[:6]: expected = conn.execute(sql).fetchdf() result = execute( parse_one(sql, dialect="duckdb").transform(_to_csv).sql(pretty=True),