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

(1 comment)

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:       lowerTopN.setTopNMergeParent(upperTopN);
> `lowerTopN` has already run `init()` and `computeStats()` before this split
I'd soften "harmless" here. ExchangeNode copies the local Top-N cardinality and 
divides it by getNumNodes() for the queue memory estimate, so it uses it as a 
total. With two senders each returning five rows for the same ten groups and no 
ties, 100 rows cross the exchange while the final Top-N returns 50.

My suggestion to recompute doesn't solve this either: the non-HBO estimate can 
have the same problem. Could we document this approximation and track the 
exchange costing separately?



--
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: Sun, 06 Sep 2026 07:15:27 +0000
Gerrit-HasComments: Yes

Reply via email to