Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/24608 )

Change subject: IMPALA-15175: Support HBO for AnalyticEvalNode cardinality
......................................................................

IMPALA-15175: Support HBO for AnalyticEvalNode cardinality

AnalyticEvalNode appends analytic results to the input tuples as new
columns. Though they won't change the cardinality, the analytic results
could be used in downstream group-by keys, join keys, or predicates,
which matters in cardinalities of downstream nodes. This patch adds
AnalyticEvalNode in the HBO key strings so its parent nodes can still be
tracked in HBO. Note that cardinality of AnalyticEvalNode is still
untracked since it can be simply deduced from its input cardinality.

The HBO key string of an AnalyticEvalNode consists of
 - Analytic functions
 - PartitionBy Exprs
 - OrderBy Exprs
 - Window
 - The child's HBO key string

Exprs are canonicalized with operand indexes if the child node has
multiple output tuples, e.g., JoinNode. PartitionBy Exprs are sorted
since the order doesn't matter. OrderBy Exprs are added using the
original order.

Testing
 - Added FE tests and e2e tests

Assisted-by: Opus 4.8 (Claude Code)
Change-Id: I8d87ab472db9273622f48fa62bb1d8c12e04e86b
Reviewed-on: http://gerrit.cloudera.org:8080/24608
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M fe/src/main/java/org/apache/impala/analysis/AnalyticExpr.java
M fe/src/main/java/org/apache/impala/planner/AnalyticEvalNode.java
M fe/src/test/java/org/apache/impala/planner/HboKeyStringTest.java
A testdata/workloads/functional-query/queries/QueryTest/hbo-analytic-agg.test
A testdata/workloads/functional-query/queries/QueryTest/hbo-analytic-join.test
M tests/query_test/test_hbo.py
6 files changed, 617 insertions(+), 1 deletion(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8d87ab472db9273622f48fa62bb1d8c12e04e86b
Gerrit-Change-Number: 24608
Gerrit-PatchSet: 15
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]>

Reply via email to