Quanlong Huang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24556 )

Change subject: IMPALA-15127: Support HBO for UnionNode cardinality
......................................................................


Patch Set 8:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/24556/8/fe/src/main/java/org/apache/impala/planner/UnionNode.java
File fe/src/main/java/org/apache/impala/planner/UnionNode.java:

http://gerrit.cloudera.org:8080/#/c/24556/8/fe/src/main/java/org/apache/impala/planner/UnionNode.java@376
PS8, Line 376:     
sb.append("constOps:").append(constExprLists_.size()).append("|");
> So we're just counting the constant operations and not showing what's in th
That's a good point! I think conjuncts might be safe since they will be 
migrated into the UnionStmt:
https://github.com/apache/impala/blob/c7dd8b5f95e262065a682e5cbf80645f3bc2809a/fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java#L2353-L2355
Const operands that don't survive in the predicates will be marked as 
hasEmptyResultSet=true then be skipped:
https://github.com/apache/impala/blob/c7dd8b5f95e262065a682e5cbf80645f3bc2809a/fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java#L2297-L2308
Then at the point of creating UnionNode, the const operands are all valid.

However, if downstream PlanNodes aggregate or join on the const operand 
results, the cardinality might change. I think the ancestor nodes can pass down 
this info when generating HBO key strings of their children. Such use case 
seems rare so let's fix it in a future patch.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie228f530bdcb171d3b717966673164bf9a4c45c8
Gerrit-Change-Number: 24556
Gerrit-PatchSet: 8
Gerrit-Owner: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Comment-Date: Fri, 31 Jul 2026 08:52:24 +0000
Gerrit-HasComments: Yes

Reply via email to