perf: reuse column normalization context across expressions - #25010
Open
goutamadwant wants to merge 1 commit into
Open
perf: reuse column normalization context across expressions#25010goutamadwant wants to merge 1 commit into
goutamadwant wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25010 +/- ##
========================================
Coverage 81.69% 81.70%
========================================
Files 1127 1127
Lines 415471 415743 +272
Branches 415471 415743 +272
========================================
+ Hits 339424 339672 +248
+ Misses 56108 56107 -1
- Partials 19939 19964 +25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
Column normalization repeatedly collects fallback schemas and traverses the input plan for USING columns. Wide expression lists and projections repeat that work for the same immutable plan.
What changes are included in this PR?
What is the testing strategy for this PR?
normalize_batch_schema_precedence,normalize_batch_using_join, andnormalize_batch_skips_unused_plan_contextto cover schema precedence, USING joins, ambiguity/error order, sort options, and lazy handling of qualified columns and literals.release-nonltoruns, constructing a 2,000-column unqualified projection falls from about 100 ms to 35 ms. This measures projection construction, not full protobuf decoding; small controls remain noisy.cargo bench -p datafusion-expr --bench normalize_columns --profile release-nonlto.dev/rust_lint.shalso passes, including strict workspace documentation checks.Are there any user-facing changes?
No public API or name-resolution behavior changes are intended. Normalization reuses plan context instead of collecting it for each column; existing schema lookup costs remain.