Arnab Karmakar has posted comments on this change. ( http://gerrit.cloudera.org:8080/25235 )
Change subject: IMPALA-15698: Calcite planner: keep grand totals ...................................................................... Patch Set 1: (5 comments) Looks good! http://gerrit.cloudera.org:8080/#/c/25235/1//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/25235/1//COMMIT_MSG@7 PS1, Line 7: IMPALA-15698: Calcite planner: keep grand totals Please mention empty-input prune so it is distinguishable from IMPALA-15703. http://gerrit.cloudera.org:8080/#/c/25235/1/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java: http://gerrit.cloudera.org:8080/#/c/25235/1/java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java@112 PS1, Line 112: getGroupSets Unlikely but there could be an edge case where getGroupSets() is empty, and stream().noneMatch() would behave like the old aggresive prune. Maybe we can add a defensive check !aggregate.getGroupSets().isEmpty() to prevent that. http://gerrit.cloudera.org:8080/#/c/25235/1/java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteEmptyPruningTest.java File java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteEmptyPruningTest.java: http://gerrit.cloudera.org:8080/#/c/25235/1/java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteEmptyPruningTest.java@55 PS1, Line 55: assertMixedGrandTotal(plan("select a ka, grouping(a) ga, grouping_id(a) gid, " First failure can hide the second. http://gerrit.cloudera.org:8080/#/c/25235/1/java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteEmptyPruningTest.java@96 PS1, Line 96: var Can we use the explicit types instead of var. Same for line 98. http://gerrit.cloudera.org:8080/#/c/25235/1/java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteEmptyPruningTest.java@99 PS1, Line 99: setDecimal_v2 Is decimal_v2 needed for this test? -- 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: comment Gerrit-Change-Id: I913348568ca984e344b484702110a3bb77c57401 Gerrit-Change-Number: 25235 Gerrit-PatchSet: 1 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]> Gerrit-Comment-Date: Thu, 29 Oct 2026 11:53:20 +0000 Gerrit-HasComments: Yes
