Aleksandr Efimov has posted comments on this change. ( 
https://gerrit.cloudera.org/25239 )

Change subject: IMPALA-15703: Preserve empty grouping-set totals
......................................................................


Patch Set 6:

(5 comments)

https://gerrit.cloudera.org/#/c/25239/6/fe/src/main/java/org/apache/impala/analysis/MultiAggregateInfo.java
File fe/src/main/java/org/apache/impala/analysis/MultiAggregateInfo.java:

https://gerrit.cloudera.org/#/c/25239/6/fe/src/main/java/org/apache/impala/analysis/MultiAggregateInfo.java@618
PS6, Line 618: numSlots
> nit: unrelated to this patch but this is unused and should be removed.
Removed the unused variable in PS7.


https://gerrit.cloudera.org/#/c/25239/6/fe/src/main/java/org/apache/impala/analysis/MultiAggregateInfo.java@808
PS6, Line 808:           for (int i = 0; i < 
aggInfo.getAggregateExprs().size(); ++i) {
             :             if (!FunctionCallExpr.isCountStarFunctionCallExpr(
             :                 aggInfo.getAggregateExprs().get(i))) continue;
             :             
aggInfo.getResultTupleDesc().getSlots().get(i).setIsMaterialized(true);
             :             break;
             :           }
> nit: changing this to a stream with filter/findFirst could make this cleane
I kept the indexed loop because the matching COUNT(*) index selects the tuple 
slot to materialize. A stream would still need that index.


https://gerrit.cloudera.org/#/c/25239/6/fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java
File fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java:

https://gerrit.cloudera.org/#/c/25239/6/fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java@1201
PS6, Line 1201: hasGrouping
> It reads as if the two flags were the same concept. I think we should renam
Renamed the local flag to hashPartitionedMerge in PS7.


https://gerrit.cloudera.org/#/c/25239/6/java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteEmptyGroupingSetTest.java
File 
java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteEmptyGroupingSetTest.java:

https://gerrit.cloudera.org/#/c/25239/6/java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteEmptyGroupingSetTest.java@61
PS6, Line 61: setDecimal_v2
> nit: I think we dont need setDecimal_v2().
Removed setDecimal_v2() in PS7.


https://gerrit.cloudera.org/#/c/25239/6/testdata/workloads/functional-query/queries/QueryTest/grouping-sets.test
File testdata/workloads/functional-query/queries/QueryTest/grouping-sets.test:

https://gerrit.cloudera.org/#/c/25239/6/testdata/workloads/functional-query/queries/QueryTest/grouping-sets.test@356
PS6, Line 356:
> nit: please remove these blank lines before ====.
Removed the blank lines before ==== in PS7.



--
To view, visit https://gerrit.cloudera.org/25239
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I04236dd579381fc95d51fee6e4d2dc2a04beb0d6
Gerrit-Change-Number: 25239
Gerrit-PatchSet: 6
Gerrit-Owner: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: 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]>
Gerrit-Comment-Date: Wed, 11 Nov 2026 14:50:09 +0000
Gerrit-HasComments: Yes

Reply via email to