Repository navigation
fix: preserve ExprFunctionExt options when chaining - #26486
Draft
goutamadwant wants to merge 2 commits into
Draft
goutamadwant wants to merge 2 commits into
goutamadwant wants to merge 2 commits into
Conversation
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
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?
ExprFunctionExtcan build on an existing window function #25934Rationale for this change
Adding an option to an existing aggregate or window expression can silently reset options already set on that expression. For example, adding
DISTINCTcan discardORDER BYandFILTER; adding a window partition can discard ordering. An implicit window frame must also be re-derived whenORDER BYchanges, while an explicit frame must remain unchanged.What changes are included in this PR?
ExprFuncBuilderfrom existing aggregate/window options and derive the default window frame from the final ordering.Substrait cannot retain implicit-frame provenance for ordered default frames while preserving their execution behavior; those frames need explicit bounds on export. Older protobuf plans decode the new flag as
falsewhile retaining the resolved frame.What is the testing strategy for this PR?
clippy::mutable_key_typeallowed; the unmodified command reports that lint in existingHashSet<&Expr>uses indatafusion/optimizer/src/push_down_filter.rs, which this PR does not change.These are focused local tests; CI has not run for this branch.
Are there any user-facing changes?
Yes. Chained aggregate/window options are preserved, and implicit window frames update when ordering changes.
WindowFunctionParamsandRawWindowExprgain a publicwindow_frame_explicitfield, so callers constructing these structs with literals must set it. The 56.0.0 upgrade guide documents this API change; please apply theapi changelabel.