Aleksandr Efimov created IMPALA-15236:
-----------------------------------------
Summary: Expose HBO matching provenance in query profiles
Key: IMPALA-15236
URL: https://issues.apache.org/jira/browse/IMPALA-15236
Project: IMPALA
Issue Type: Improvement
Components: Frontend
Reporter: Aleksandr Efimov
Assignee: Aleksandr Efimov
h3. Problem
When HBO replaces a plan node's estimated cardinality, the plan and profile
currently annotate it only as "(from HBO)". This does not show which
canonicalization strategy matched or how the HBO value differs from the
original estimate. As a result, surprising estimates are difficult to
investigate and profile tools such as plan-graph.py cannot explain why history
was reused.
h3. Proposed change
Expose match provenance when an HBO cardinality is applied:
* Show the selected canonicalization strategy, for example "(from HBO
EXPR_REWRITE)".
* Preserve the original planner estimate alongside the applied HBO cardinality.
* Consider exposing the opaque HBO hash key used for the match, similar to
TupleCacheNode.
The descriptive canonicalized key and raw query material should not be exposed.
Non-HBO estimates should remain unchanged. This task does not define matching
rules for future CPU, memory, or runtime statistics and does not require
stabilizing the V2 profile format.
h3. Acceptance criteria
* Text plan/profile output identifies the selected strategy for an HBO hit.
* The original estimate remains available when HBO replaces it.
* Tests cover an HBO hit and a non-HBO path.
* If a key is exposed, only the opaque hash is shown.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)