Hello Steve Carlin, Michael Smith, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24564
to look at the new patch set (#3).
Change subject: IMPALA-15156: Use stripped rels for cost metadata
......................................................................
IMPALA-15156: Use stripped rels for cost metadata
CTE and materialized-view rewrites can cost RelSubset inputs directly.
Impala's non-cumulative cost model asks those inputs for row-count and
size metadata, but metadata should come from the selected or original
rel instead of from the RelSubset wrapper.
Unwrap join and aggregate inputs before requesting row-count and
average-row-size metadata. Add average-column-size handlers for CTE
consumer, producer, and sequence nodes so Calcite can derive row sizes
from their underlying rels after that unwrap.
Do not register Calcite's FILTER_SCAN materialization rule for CTE
rewrites. That rule sends the replacement through SubstitutionVisitor,
which cannot convert ImpalaCTEConsumer to a mutable relational node.
The remaining materialization rules still cover CTE filter rewrites.
Add focused unit coverage for CTE size metadata, plus join-cost and
aggregate-cost cases that would otherwise return null and become
infinite.
Testing:
- git diff --check
- Focused Linux build environment:
TestImpalaRelMdNonCumulativeCost
(4 tests, 0 failures)
- Focused Linux CTE planner smoke covering filter, aggregate, join,
union, and nested CTEs in single-node execution and distributed
EXPLAIN; no infinite-cost diagnostics
Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
---
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdNonCumulativeCost.java
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdSize.java
M
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java
A
java/calcite-planner/src/test/java/org/apache/impala/calcite/schema/TestImpalaRelMdNonCumulativeCost.java
4 files changed, 235 insertions(+), 16 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/64/24564/3
--
To view, visit http://gerrit.cloudera.org:8080/24564
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 3
Gerrit-Owner: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>