diff --git a/benchmarks/queries/clickbench/queries.sql b/benchmarks/queries/clickbench/queries.sql index 73a6e282c2675..c4228b4303265 100644 --- a/benchmarks/queries/clickbench/queries.sql +++ b/benchmarks/queries/clickbench/queries.sql @@ -1,2 +1,3 @@ -SELECT "UserID", concat("SearchPhrase", 'helloworld21') as s, COUNT(*) FROM hits GROUP BY "UserID", s LIMIT 10; +SELECT "UserID", "SearchPhrase", COUNT(*) FROM hits GROUP BY "UserID", "SearchPhrase" ORDER BY COUNT(*) DESC LIMIT 10; SELECT "UserID", "SearchPhrase", COUNT(*) FROM hits GROUP BY "UserID", "SearchPhrase" LIMIT 10; +SELECT "UserID", concat("SearchPhrase", repeat('hello', 100)) as s, COUNT(*) FROM hits GROUP BY "UserID", s LIMIT 10; diff --git a/datafusion/physical-plan/src/aggregates/group_values/row.rs b/datafusion/physical-plan/src/aggregates/group_values/row.rs index 7589778f32cdc..e1570fd6497a6 100644 --- a/datafusion/physical-plan/src/aggregates/group_values/row.rs +++ b/datafusion/physical-plan/src/aggregates/group_values/row.rs @@ -142,7 +142,7 @@ impl GroupValues for GroupValuesRows { let mut group_values = match self.group_values.take() { Some(group_values) => group_values, - None => self.row_converter.empty_rows(n_rows, 0), + None => self.row_converter.empty_rows(0, 0), }; // tracks to which group each of the input rows belongs