You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org> on 2026/07/08 21:41:11 UTC
[Impala-ASF-CR] IMPALA-15156: Use stripped rels for cost metadata
Aleksandr Efimov has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24564
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 size metadata should be read from the selected or original rel instead of from the RelSubset wrapper.
Move the unwrap into ImpalaRelMdNonCumulativeCost and remove the temporary RelSubset average-column-size metadata override. Add a focused unit test for the join-cost path.
Testing:
- git diff --check
- Focused calcite-planner JUnit: TestImpalaRelMdNonCumulativeCost
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
A java/calcite-planner/src/test/java/org/apache/impala/calcite/schema/TestImpalaRelMdNonCumulativeCost.java
3 files changed, 142 insertions(+), 15 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/64/24564/1
--
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: newchange
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 1
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org>.
Aleksandr Efimov has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/24564/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdSize.java
File java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdSize.java:
http://gerrit.cloudera.org:8080/#/c/24564/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdSize.java@55
PS2, Line 55: public List<Double> averageColumnSizes(RelSubset subset, RelMetadataQuery mq) {
> Without this override, I still get the original error when running test_cte
You're right. Stripping only the outer rel leaves child RelSubset nodes reached recursively by size metadata. I restored the override in PS4 and added a nested-subset regression test. The full test_cte_plans query set now passes.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 2
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Fri, 10 Jul 2026 22:27:50 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-15156: Use stripped rels for cost metadata
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Use stripped rels for cost metadata
......................................................................
Patch Set 3:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/23189/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 3
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Fri, 10 Jul 2026 08:50:22 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Joe McDonnell (Code Review)" <ge...@cloudera.org>.
Joe McDonnell has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
IMPALA-15156: Fix CTE size metadata
CTE and materialized-view rewrites can produce nested RelSubset
inputs. Unwrapping only the outer input leaves child subsets in
recursive size metadata, so Calcite may return a null average row
size and assign infinite cost.
Restore average-column-size metadata for RelSubset and delegate CTE
consumer, producer, and sequence nodes to their underlying rels.
Exclude FILTER_SCAN from the CTE materialization rules because it
sends ImpalaCTEConsumer through SubstitutionVisitor, which cannot
convert it to a mutable relational node.
Add focused coverage for direct and nested RelSubset size metadata,
CTE nodes, join costing, and aggregate costing.
Testing:
- git diff --check
- calcite-planner and impala-package builds
- TestImpalaRelMdNonCumulativeCost (5 tests)
- Full test_cte_plans query set in a focused Linux environment
- CTE runtime smoke for filter, aggregate, join, union, and nested
shapes with num_nodes=1 and num_nodes=0
Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Assisted-by: gpt-5.6-sol (OpenAI Codex)
Reviewed-on: http://gerrit.cloudera.org:8080/24564
Reviewed-by: Joe McDonnell <jo...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
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
3 files changed, 210 insertions(+), 8 deletions(-)
Approvals:
Joe McDonnell: Looks good to me, approved
Impala Public Jenkins: Verified
--
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: merged
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 12
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 6: Verified-1
Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/13821/
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 6
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Tue, 04 Aug 2026 03:38:03 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 6:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/13821/ DRY_RUN=true
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 6
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Mon, 03 Aug 2026 22:45:55 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Joe McDonnell (Code Review)" <ge...@cloudera.org>.
Joe McDonnell has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 11: Code-Review+2
This looks good to me. Steve already +2'd this, so going straight to +2
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 11
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Thu, 13 Aug 2026 23:49:13 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org>.
Aleksandr Efimov has uploaded a new patch set (#5). ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
IMPALA-15156: Fix CTE size metadata
CTE and materialized-view rewrites can produce nested RelSubset
inputs. Unwrapping only the outer input leaves child subsets in
recursive size metadata, so Calcite may return a null average row
size and assign infinite cost.
Restore average-column-size metadata for RelSubset and delegate CTE
consumer, producer, and sequence nodes to their underlying rels.
Exclude FILTER_SCAN from the CTE materialization rules because it
sends ImpalaCTEConsumer through SubstitutionVisitor, which cannot
convert it to a mutable relational node.
Add focused coverage for direct and nested RelSubset size metadata,
CTE nodes, join costing, and aggregate costing.
Testing:
- git diff --check
- calcite-planner and impala-package builds
- TestImpalaRelMdNonCumulativeCost (5 tests)
- Full test_cte_plans query set in a focused Linux environment
- CTE runtime smoke for filter, aggregate, join, union, and nested
shapes with num_nodes=1 and num_nodes=0
Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Assisted-by: gpt-5.6-sol (OpenAI Codex)
---
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
3 files changed, 210 insertions(+), 8 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/64/24564/5
--
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: 5
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
[Impala-ASF-CR] IMPALA-15156: Use stripped rels for cost metadata
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Use stripped rels for cost metadata
......................................................................
Patch Set 2:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/23168/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 2
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Thu, 09 Jul 2026 14:02:54 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 4:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/13737/ DRY_RUN=true
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 4
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Sat, 11 Jul 2026 00:14:22 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 4: Verified+1
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 4
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Sat, 11 Jul 2026 04:30:28 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 6:
> Patch Set 6:
>
> > Patch Set 6: Verified-1
> >
> > Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/13821/
>
> I had a look at the failed build. Both downstream jobs fail only test_cte_plans and test_cte_distributed.
>
> This seems to come from the rebase rather than the changes in 24564. IMPALA-2210 changed the default file format from TEXT to PARQUET, while both tests create emps without an explicit STORED AS. The resulting file is now 1.13KB instead of 58B, which also changes the cardinality and resource estimates in the expected plans.
>
> The smallest fix seems to be adding STORED AS TEXTFILE to those two CREATE TABLE statements in 22094. That would keep the tests independent of the global default and keep 24564 focused.
I'll look into it, thanks for digging.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 6
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Tue, 04 Aug 2026 16:03:43 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 11:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/13843/ DRY_RUN=true
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 11
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Fri, 14 Aug 2026 00:23:17 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Use stripped rels for cost metadata
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Use stripped rels for cost metadata
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/24564/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdSize.java
File java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdSize.java:
http://gerrit.cloudera.org:8080/#/c/24564/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdSize.java@55
PS2, Line 55: public List<Double> averageColumnSizes(RelSubset subset, RelMetadataQuery mq) {
Since you still kept this override, what additional benefit do you see to these changes?
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 2
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Thu, 09 Jul 2026 16:25:25 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-15156: Use stripped rels for cost metadata
Posted by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org>.
Aleksandr Efimov has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Use stripped rels for cost metadata
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/24564/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdSize.java
File java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdSize.java:
http://gerrit.cloudera.org:8080/#/c/24564/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdSize.java@55
PS2, Line 55: public List<Double> averageColumnSizes(RelSubset subset, RelMetadataQuery mq) {
> Since you still kept this override, what additional benefit do you see to t
Removed the RelSubset size override in PS3. The cost path now unwraps subsets before requesting row-count and row-size metadata; the remaining CTE consumer/producer/sequence handlers are still needed so averageRowSize() can derive column sizes for those custom rels.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 2
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Fri, 10 Jul 2026 08:31:50 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org>.
Aleksandr Efimov has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 5:
You're right. I traced the submitted-together chain: PS5 is directly on the current 22094 PS56, but the bottom change, 22091 PS37, conflicts with current master. The conflict is in ParentPlanRelContext.java, where 22091 and 08c8cf9b7f (IMPALA-15019) both add initialization in the same Builder constructor. That makes the whole 22091 -> 22092 -> 22094 -> 24564 stack show Cannot Merge. Once the parent stack is rebased, I'll rebase this change onto the updated 22094.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 5
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Jul 2026 16:55:06 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org>.
Aleksandr Efimov has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 6:
> Patch Set 6: Verified-1
>
> Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/13821/
I had a look at the failed build. Both downstream jobs fail only test_cte_plans and test_cte_distributed.
This seems to come from the rebase rather than the changes in 24564. IMPALA-2210 changed the default file format from TEXT to PARQUET, while both tests create emps without an explicit STORED AS. The resulting file is now 1.13KB instead of 58B, which also changes the cardinality and resource estimates in the expected plans.
The smallest fix seems to be adding STORED AS TEXTFILE to those two CREATE TABLE statements in 22094. That would keep the tests independent of the global default and keep 24564 focused.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 6
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Tue, 04 Aug 2026 03:59:58 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org>.
Aleksandr Efimov has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 5:
Thanks, Steve! PS5 is rebased on 22094 PS56 and ready for the Jenkins rerun.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 5
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Jul 2026 16:08:55 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Steve Carlin (Code Review)" <ge...@cloudera.org>.
Steve Carlin has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 5:
Hmmm...I'm not super familiar with how this all works, but it still is saying "Cannot Merge"
I think there are some "parent" commits in your code that may be blocking it?
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 5
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Jul 2026 16:39:47 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Use stripped rels for cost metadata
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Use stripped rels for cost metadata
......................................................................
Patch Set 1:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/23157/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 1
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Wed, 08 Jul 2026 22:03:28 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Use stripped rels for cost metadata
Posted by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org>.
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 (#2).
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.
The direct cost path already strips join and aggregate inputs. Keep
the size metadata path consistent by delegating RelSubset, CTE
consumer, CTE producer, and sequence average-column-size metadata to
their underlying rels before asking Calcite for average row size.
Add focused unit coverage for RelSubset and 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
(5 tests, 0 failures)
- Focused Linux CTE planner smoke covering single-node 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, 252 insertions(+), 14 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/64/24564/2
--
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: 2
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 8: Verified+1
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 8
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Mon, 10 Aug 2026 19:58:07 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org>.
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 (#4).
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
IMPALA-15156: Fix CTE size metadata
CTE and materialized-view rewrites can produce nested RelSubset
inputs. Unwrapping only the outer input leaves child subsets in
recursive size metadata, so Calcite may return a null average row
size and assign infinite cost.
Restore average-column-size metadata for RelSubset and delegate CTE
consumer, producer, and sequence nodes to their underlying rels.
Exclude FILTER_SCAN from the CTE materialization rules because it
sends ImpalaCTEConsumer through SubstitutionVisitor, which cannot
convert it to a mutable relational node.
Add focused coverage for direct and nested RelSubset size metadata,
CTE nodes, join costing, and aggregate costing.
Testing:
- git diff --check
- calcite-planner and impala-package builds
- TestImpalaRelMdNonCumulativeCost (5 tests)
- Full test_cte_plans query set in a focused Linux environment
- CTE runtime smoke for filter, aggregate, join, union, and nested
shapes with num_nodes=1 and num_nodes=0
Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
---
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
3 files changed, 210 insertions(+), 8 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/64/24564/4
--
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: 4
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
[Impala-ASF-CR] IMPALA-15156: Use stripped rels for cost metadata
Posted by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org>.
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 <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 4:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/23218/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 4
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Fri, 10 Jul 2026 22:49:43 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 8:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/13837/ DRY_RUN=true
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 8
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Mon, 10 Aug 2026 15:04:40 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Steve Carlin (Code Review)" <ge...@cloudera.org>.
Steve Carlin has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 4:
Sorry, was a little slow on this and now there's a merge issue.
Back from a couple of days off here
Can you rebase this patch? Once you do this, I'll rerun the jenkins test and merge it in.
Thanks for doing this!
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 4
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Jul 2026 13:51:52 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 11: Verified+1
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 11
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Fri, 14 Aug 2026 05:12:37 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Use stripped rels for cost metadata
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Use stripped rels for cost metadata
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
This wasn't sufficient for me, tests/query_test/test_calcite_planner.py::TestCalcitePlanner::{test_cte_plans,test_cte_distributed} still fail with "cost is still infinite."
http://gerrit.cloudera.org:8080/#/c/24564/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/24564/1//COMMIT_MSG@9
PS1, Line 9: 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 size metadata should be read from the selected or original rel instead of from the RelSubset wrapper.
nit: please use 72 character column width for commit messages to be consistent with the rest of our commits.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 1
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Wed, 08 Jul 2026 22:42:26 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-15156: Use stripped rels for cost metadata
Posted by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org>.
Aleksandr Efimov has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Use stripped rels for cost metadata
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/24564/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/24564/1//COMMIT_MSG@9
PS1, Line 9: 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 size metadata should be read from the selected or original rel instead of from the RelSubset wrapper.
> nit: please use 72 character column width for commit messages to be consist
Fixed in PS2.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 1
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Thu, 09 Jul 2026 13:43:33 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-15156: Use stripped rels for cost metadata
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Use stripped rels for cost metadata
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/24564/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdSize.java
File java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdSize.java:
http://gerrit.cloudera.org:8080/#/c/24564/2/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/ImpalaRelMdSize.java@55
PS2, Line 55: RelMetadataQuery mq) {
> Removed the RelSubset size override in PS3. The cost path now unwraps subse
Without this override, I still get the original error when running test_cte_plans.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 3
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Fri, 10 Jul 2026 18:54:26 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 4: Code-Review+1
This seems right.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 4
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Fri, 10 Jul 2026 23:11:38 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Steve Carlin (Code Review)" <ge...@cloudera.org>.
Steve Carlin has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 4: Code-Review+2
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 4
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Sat, 11 Jul 2026 00:14:08 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Aleksandr Efimov (Code Review)" <ge...@cloudera.org>.
Aleksandr Efimov has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 5:
Rebased on 22094 PS56 without changing the patch. TestImpalaRelMdNonCumulativeCost (5 tests) and focused CTE runtime smoke for filter, aggregate, join, union, and nested shapes pass.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 5
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Jul 2026 16:01:00 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15156: Fix CTE size metadata
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24564 )
Change subject: IMPALA-15156: Fix CTE size metadata
......................................................................
Patch Set 5:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/23441/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
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: comment
Gerrit-Change-Id: Ide226449f7b7a33fffd67f403b03fd5b2fee53ee
Gerrit-Change-Number: 24564
Gerrit-PatchSet: 5
Gerrit-Owner: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Aleksandr Efimov <dz...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Jul 2026 16:22:03 +0000
Gerrit-HasComments: No