Aleksandr Efimov has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24592 )

Change subject: IMPALA-15189: Support HBO for SortNode cardinality
......................................................................


Patch Set 7:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/24592/7/fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java
File fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java:

http://gerrit.cloudera.org:8080/#/c/24592/7/fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java@1381
PS7, Line 1381:       SortNode parentSortNode;
parentSortNode is assigned in both branches and never read now - the 
setTopNMergeParent() call that used it is gone in PS7. The new check in the 
SortNode constructor does not cover this branch: both merge Top-Ns are built on 
exchNode rather than on the sort, so childSortNode keeps mergeParent_ null. It 
is no longer a merge input, so it takes an HBO cardinality and stores its own 
run. Both nodes then store under the same key, and the local one stores the 
cross-instance sum - the collision from the line 1390 thread. No plan under 
functional-planner has a Top-N with ties below an UNPARTITIONED exchange, so no 
golden shows this. Was dropping the call deliberate?



--
To view, visit http://gerrit.cloudera.org:8080/24592
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib829887a91593bee124d56e661e714575fe3be97
Gerrit-Change-Number: 24592
Gerrit-PatchSet: 7
Gerrit-Owner: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Comment-Date: Wed, 02 Sep 2026 19:05:05 +0000
Gerrit-HasComments: Yes

Reply via email to