Hello Arnab Karmakar, Steve Carlin, Michael Smith, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/25237
to look at the new patch set (#4).
Change subject: IMPALA-15699: Fix GROUPING_ID with repeated sets
......................................................................
IMPALA-15699: Fix GROUPING_ID with repeated sets
Use the GROUPING kind so RelBuilder can split partial GROUPING_ID
masks. Calcite's rewrite only recognizes that kind. Bind generated
standard GROUPING calls to native BIGINT GROUPING_ID.
For example, this previously failed during native conversion:
select grouping_id(a,b)
from (select 1 a, 2 b union all select 3, 4) t
group by grouping sets ((b), (a,b), (), (b), ());
Keep direct conversion tests and shared SQL cases for masks, NULL
keys and HAVING. Preserve each planner's current multiplicity for
repeated sets.
Testing: all eight conversion cases pass; four fail without the fix
as expected. Shared QueryTest passed with both planners, codegen
off/on, distributed mt_dop 0/4 and single-node execution, without
fallback (48 SELECT profiles).
Change-Id: Ieab66c076173c1266492382cffb55e7e2139b84c
Assisted-by: gpt-6.1-sol
---
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaGroupingIdFunction.java
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaAggRel.java
A
java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteGroupingIdTest.java
A testdata/workloads/functional-query/queries/QueryTest/grouping-id.test
M tests/query_test/test_aggregation.py
5 files changed, 278 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/37/25237/4
--
To view, visit http://gerrit.cloudera.org:8080/25237
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ieab66c076173c1266492382cffb55e7e2139b84c
Gerrit-Change-Number: 25237
Gerrit-PatchSet: 4
Gerrit-Owner: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>