Hello Steve Carlin, Michael Smith,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/25235

to review the following change.


Change subject: IMPALA-15698: Calcite planner: keep grand totals
......................................................................

IMPALA-15698: Calcite planner: keep grand totals

Keep aggregates with an empty grouping set when pruning empty inputs.
The Calcite rule checks the overall grouping-key count, which can be
nonzero even when one grouping set must produce a grand-total row.
Continue pruning keyed-only aggregates.

Add optimizer tests for literal and runtime-empty inputs, grouping
masks, HAVING, repeated empty sets and keyed-only controls. These stop
before native conversion; shared grouping-set execution fixes are
separate.

Testing: 5 focused optimizer tests passed; 3 fail on the baseline.

Change-Id: I913348568ca984e344b484702110a3bb77c57401
Assisted-by: gpt-6.1-sol
---
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java
A 
java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteEmptyPruningTest.java
2 files changed, 137 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/35/25235/1
--
To view, visit http://gerrit.cloudera.org:8080/25235
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I913348568ca984e344b484702110a3bb77c57401
Gerrit-Change-Number: 25235
Gerrit-PatchSet: 1
Gerrit-Owner: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>

Reply via email to