Aleksandr Efimov has posted comments on this change. ( http://gerrit.cloudera.org:8080/24556 )
Change subject: IMPALA-15127: Support HBO for UnionNode cardinality ...................................................................... Patch Set 8: (4 comments) 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("|"); > PS13 addes the constants into the key. The canonicalized constant rows in the key look good. One edge case with the (LiteralExpr) cast - commented on PS13. http://gerrit.cloudera.org:8080/#/c/24556/8/fe/src/main/java/org/apache/impala/planner/UnionNode.java@391 PS8, Line 391: List<PlanNode.HboKeyedNode> sortedChildren = PlanNode.buildSortedHboNodes( > Done. Added an e2e test. Thanks - the swapped-predicates pair in hbo-union-same-tables.test is exactly the regression coverage I was after. http://gerrit.cloudera.org:8080/#/c/24556/8/fe/src/main/java/org/apache/impala/planner/UnionNode.java@415 PS8, Line 415: populateHboThriftFields(msg, serialCtx); > Extended the code to allow empty scan input stats for matching const-only U Verified PS13: both preconditions are gone, scanInputStatsMatch() matches an empty stats list only against another empty one, and hbo-union-consts.test covers the DISTINCT shape (tracked AGGREGATE over an untracked const-only UNION). Write and read paths are consistent now. Thanks! http://gerrit.cloudera.org:8080/#/c/24556/8/fe/src/main/java/org/apache/impala/service/HistoricalStats.java File fe/src/main/java/org/apache/impala/service/HistoricalStats.java: http://gerrit.cloudera.org:8080/#/c/24556/8/fe/src/main/java/org/apache/impala/service/HistoricalStats.java@118 PS8, Line 118: for (int i = 0; i < runs.size(); i++) { > Searching newest-to-oldest still have problems. E.g. when the list has only Agreed. The [110, 122] example shows newest-first has shadowing cases of its own, and since the write path replaces similar runs, the list stays self-correcting over time. Keeping first-match is fine. -- 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: Aleksandr Efimov <[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: Mon, 17 Aug 2026 07:34:58 +0000 Gerrit-HasComments: Yes
