Qifan Chen has posted comments on this change. ( http://gerrit.cloudera.org:8080/20379 )
Change subject: IMPALA-12383: Fix SingleNodePlanner aggregation limits ...................................................................... Patch Set 7: (2 comments) Looks good and I think we are converge toward +2. http://gerrit.cloudera.org:8080/#/c/20379/4/fe/src/main/java/org/apache/impala/planner/AggregationNode.java File fe/src/main/java/org/apache/impala/planner/AggregationNode.java: http://gerrit.cloudera.org:8080/#/c/20379/4/fe/src/main/java/org/apache/impala/planner/AggregationNode.java@777 PS4, Line 777: return useIntermediateTuple_ || endsMultiPhase_; nit. May add a comment: useIntermediateTuple_ is set to true for any non merge nodes and endsMultiPhase_ is true for a merge node. http://gerrit.cloudera.org:8080/#/c/20379/4/fe/src/main/java/org/apache/impala/planner/AggregationNode.java@786 PS4, Line 786: && isMultiPhase() > Unless I misunderstood your example, we can't sort on partition keys Okay. The test on useIntermediateTuple_ resolves my concern :-). I think I am okay with the change for the distributed plans. In a serial plan, per https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/planner/AggregationNode.java#L475, the aggregation node may lost the capability to bail out early. Can we mend it somehow as follows? return isSingleClassAgg() && hasLimit() && hasGrouping() && (is_serial_plan || isMultiPhase()) && !multiAggInfo_.hasAggregateExprs() && getConjuncts().isEmpty(); -- To view, visit http://gerrit.cloudera.org:8080/20379 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic5eec1190e8e182152aa954897b79cc3f219c816 Gerrit-Change-Number: 20379 Gerrit-PatchSet: 7 Gerrit-Owner: Michael Smith <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Qifan Chen <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Comment-Date: Fri, 25 Aug 2023 00:35:10 +0000 Gerrit-HasComments: Yes
