-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support n-ary monotonic functions in ordering equivalence #13841
Support n-ary monotonic functions in ordering equivalence #13841
Conversation
…ions for `ConcatFunc`
Note about Cargo.toml changesI added |
datafusion/physical-expr/Cargo.toml
Outdated
@@ -44,6 +44,7 @@ arrow-schema = { workspace = true } | |||
datafusion-common = { workspace = true, default-features = true } | |||
datafusion-expr = { workspace = true } | |||
datafusion-expr-common = { workspace = true } | |||
datafusion-functions = { workspace = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since only test requires this, maybe move to dev-dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or maybe move the test in datafusion/core/tests
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved it to dev-dependencies for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a naming comment
will be merged once CI passes one more time |
Which issue does this PR close?
Closes #13839.
Rationale for this change
DataFusion's ordering equivalence system currently only handles single-parameter monotonic functions. This PR extends support to N-ary functions that preserve lexicographical ordering, like concat(). This enables more optimization opportunities when working with ordered data.
What changes are included in this PR?
preserves_lex_ordering
field toExprProperties
output_preserves_lex_ordering
for concat functiondiscover_new_orderings()
to handle multiple parametersAre these changes tested?
Yes, added three new test cases:
Are there any user-facing changes?
No user-facing changes. This is an internal optimization improvement.