Uh oh!
There was an error while loading. Please reload this page.
Add exact HigherOrderSignature - #22326
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 |
gabotechs
left a comment
There was a problem hiding this comment.
This looks good! just had a couple of questions
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
gabotechs
left a comment
There was a problem hiding this comment.
Looks good! thanks @LiaCastaneda
gabotechs
commented
May 18, 2026
Thanks @LiaCastaneda! merging this one now. |
Uh oh!
There was an error while loading. Please reload this page.
LiaCastaneda
commented
May 18, 2026
🤔 there is something going on with the merge queue |
Uh oh!
There was an error while loading. Please reload this page.
## Which issue does this PR close? No issue — this is a follow-up to apache#21679. ## Rationale for this change In `ScalarUDF`, arity is enforced by the framework via `TypeSignature`. In `HigherOrderUDF`, functions with a fixed number of value and lambda arguments had to use `UserDefined` and manually validate arity inside `coerce_value_types`, which is boilerplate that every implementor has to repeat. ## What changes are included in this PR? Adds `HigherOrderTypeSignature::Exact { values: usize, lambdas: usize } `variant that enforces a fixed count of value and lambda arguments, calling coerce_value_types only for type coercion as well ## Are these changes tested? Yes I added some planning tests for exact siganture in `datafusion/expr/src/type_coercion/functions.rs` ## Are there any user-facing changes? Yes a new signature for HigherOrderSignature was added. (cherry picked from commit fb26fd9)
## Which issue does this PR close? No issue — this is a follow-up to apache#21679. ## Rationale for this change In `ScalarUDF`, arity is enforced by the framework via `TypeSignature`. In `HigherOrderUDF`, functions with a fixed number of value and lambda arguments had to use `UserDefined` and manually validate arity inside `coerce_value_types`, which is boilerplate that every implementor has to repeat. ## What changes are included in this PR? Adds `HigherOrderTypeSignature::Exact { values: usize, lambdas: usize } `variant that enforces a fixed count of value and lambda arguments, calling coerce_value_types only for type coercion as well ## Are these changes tested? Yes I added some planning tests for exact siganture in `datafusion/expr/src/type_coercion/functions.rs` ## Are there any user-facing changes? Yes a new signature for HigherOrderSignature was added. (cherry picked from commit fb26fd9)
Which issue does this PR close?
No issue — this is a follow-up to #21679. - EPIC #21172
Rationale for this change
In
ScalarUDF, arity is enforced by the framework viaTypeSignature. InHigherOrderUDF, functions with a fixed number of value and lambda arguments had to useUserDefinedand manually validate arity insidecoerce_value_types, which is boilerplate that every implementor has to repeat.What changes are included in this PR?
Adds
HigherOrderTypeSignature::Exact { values: usize, lambdas: usize }variant that enforces a fixed count of value and lambda arguments, calling coerce_value_types only for type coercion as wellAre these changes tested?
Yes I added some planning tests for exact siganture in
datafusion/expr/src/type_coercion/functions.rsAre there any user-facing changes?
Yes a new signature for HigherOrderSignature was added.