Skip to content

Fix self join leaf expressions - #24242

Open
cetra3 wants to merge 2 commits into
apache:mainfrom
pydantic:fix_self_join_leaf_expression
Open

Fix self join leaf expressions#24242
cetra3 wants to merge 2 commits into
apache:mainfrom
pydantic:fix_self_join_leaf_expression

Conversation

@cetra3

@cetra3 cetra3 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

This is a bugfix for a specific query shape.

What changes are included in this PR?

Changes the way leaf expressions are extracted when the alias is essentially the same as the column

Are these changes tested?

Yes, with a test that fails on main currently

Are there any user-facing changes?

Nope

@github-actions github-actions Bot added the optimizer Optimizer rules label Aug 11, 2026
@codecov-commenter

codecov-commenter commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.04878% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.98%. Comparing base (a9b61ab) to head (d935290).

Files with missing lines Patch % Lines
...tafusion/optimizer/src/extract_leaf_expressions.rs 78.04% 0 Missing and 9 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24242      +/-   ##
==========================================
- Coverage   80.99%   80.98%   -0.01%     
==========================================
  Files        1106     1106              
  Lines      383549   383590      +41     
  Branches   383549   383590      +41     
==========================================
+ Hits       310644   310664      +20     
- Misses      54570    54578       +8     
- Partials    18335    18348      +13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

optimizer Optimizer rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

push_down_leaf_projections fails for self joins in some scenarios

2 participants