Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/24592 )
Change subject: IMPALA-15189: Support HBO for SortNode cardinality ...................................................................... Patch Set 6: (2 comments) Thanks for the comments! Rebased onto the latest join patch and addressed comments. http://gerrit.cloudera.org:8080/#/c/24592/5/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/5/fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java@1294 PS5, Line 1294: // Make sure the childFragment's output is partitioned as required by the sortNode. > The recompute drops the HBO cardinality but not hasHboCard_ - nothing ever Nice catch! We should reset hasHboCard_ in tryUpdateCardinalityFromHbo(). I'll leave this to IMPALA-15236 since that patch has done this and will be merged first. For the TODO, I think the planner wants per-instance cardinality for local sort nodes. But even the per-instance cardinality could be different in local sort node and final sort node. PS6 assumes they are close so share the HBO key string for them. We might need to revisit this. http://gerrit.cloudera.org:8080/#/c/24592/5/fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java@1390 PS5, Line 1390: ctx_.getNextNodeId(), exchNode, childSortNode.getSortInfo(), > In the non-ties path childSortNode is not marked as merge input, so this co That's a good point. We should handle the plain distributed sort plan as well. In this case, the merging-exchange acts as the final sort node. We should track and use HBO stats there and skip the local sort node. Also added OFFSET to the test. -- 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: 6 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: Mon, 31 Aug 2026 14:15:55 +0000 Gerrit-HasComments: Yes
