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 7:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/24592/6/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/6/fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java@1352
PS6, Line 1352:       analyticFragment.addPlanRoot(upperTopN);
> `lowerTopN` has already run `init()` and `computeStats()` before this split
We can add lowerTopN.computeStats() here to clear the HBO cardinality. But I 
think this is better than the estimate. Or is there a case that we'd better 
drop the HBO cardinality?

Updated the comments and added the test.


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

http://gerrit.cloudera.org:8080/#/c/24592/6/fe/src/main/java/org/apache/impala/planner/SortNode.java@233
PS6, Line 233:   public void setSortMergeParent(PlanNode p) { mergeParent_ = p; 
}
> `OFFSET` without `LIMIT` is still cardinality-changing here. For a legal TO
Nice catch! We should handle the case of OFFSET without LIMIT.



--
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 13:21:22 +0000
Gerrit-HasComments: Yes

Reply via email to