Repository navigation
fix: preserve field metadata for simple CASE branches - #26145
osipovartem wants to merge 13 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26145 +/- ##
==========================================
- Coverage 82.77% 82.76% -0.01%
==========================================
Files 1147 1147
Lines 450580 451349 +769
Branches 450580 451349 +769
==========================================
+ Hits 372946 373574 +628
- Misses 54931 54963 +32
- Partials 22703 22812 +109 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Independent review found that the iterative CASE metadata walker still needs contract-equivalent UDF argument fields (including coerced scalar literals and CASE nullability) and a bounded higher-order-function path. I marked this PR draft until those correctness and planning-cost issues are resolved. Please do not merge the current version. |
|
Independent review found that nested alias field inference can amplify CASE metadata planning cost. The standalone fix is #26156 (12 nested aliases: 4,096 source-field resolutions before, one after). I marked this PR draft until that fix lands, this branch is rebased, and its CASE-specific behavior is re-reviewed. Physical CaseExpr propagation remains the separate follow-up described above. |
|
I checked the latest Codecov report (74.06% patch coverage, 104 lines not fully covered) against its line-level data. The four fully missed lines in the new CASE production walker are defensive |
(cherry picked from commit 816119e839317cca1b31ef02ad0e8e302e0c60d0)
(cherry picked from commit 185ae25)
Which issue does this PR address?
Part of #24860. This is logical schema propagation for CASE, complementary to #24865.
What changes?
to_fieldcontract. Exact delegation is limited to expression depth 8 to bound repeated field inference. Deeper function branches and unsupported branch forms conservatively leave CASE metadata empty.CASEexpressions drop field metadata, silently stripping Arrow extension types and breaking metadata-aware UDFs #24860.Validation
datafusion-expranddatafusion-optimizersuites: 283 + 934 tests passed. Focused CASE tests, formatting, anddatafusion-exprtest-target Clippy also pass.core_integrationrun passed andcargo fmt --all --checkpassed.74ac5de5bat 74.06% patch coverage. Additional branch-focused tests were added incc221b5fd,d03385576, and3a8631b7f; a report for the current head is still pending. Some old partials are defensive errors and Rust?branches in tests. No coverage percentage is claimed for the current head yet.