Repository navigation
fix(ffi): preserve aggregate null-handling support - #23908
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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #23908 +/- ##
==========================================
- Coverage 80.65% 80.65% -0.01%
==========================================
Files 1093 1093
Lines 371619 371637 +18
Branches 371619 371637 +18
==========================================
- Hits 299730 299727 -3
- Misses 53993 54009 +16
- Partials 17896 17901 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
@Amogh-2404
Thanks for working on this!
This looks good to me. I just have one small suggestion that could improve coverage at the planner boundary.
| } | ||
|
|
||
| #[test] | ||
| fn test_supports_null_handling_clause() -> Result<()> { |
There was a problem hiding this comment.
Nice addition. Since this test already verifies the cross-library callback and covers the FFI regression, it might also be worth registering the foreign UDAFs in a SessionContext and checking the SQL planner behavior. For example, you could assert that first_value(...) IGNORE NULLS plans successfully, while sum(...) IGNORE NULLS is rejected. That would exercise the user-facing planner boundary around supports_null_handling_clause, not just the direct trait dispatch.
timsaucer
left a comment
There was a problem hiding this comment.
Nice addition. Thank you for the PR!
## Which issue does this PR close? Part of apache#22331. ## Rationale for this change `ForeignAggregateUDF` inherits the default `supports_null_handling_clause`, so producer overrides are lost across the FFI boundary. ## What changes are included in this PR? - Forward `supports_null_handling_clause` through `FFI_AggregateUDF`. - Use `first_value` as the positive case and `sum` as the negative case in forced-foreign and dynamic-library tests. ## Are these changes tested? - `cargo test -p datafusion-ffi --features integration-tests` - `cargo clippy --all-targets --all-features -- -D warnings` ## Are there any user-facing changes? The FFI ABI changes. Foreign libraries must rebuild against the new DataFusion version.
Which issue does this PR close?
Part of #22331.
Rationale for this change
ForeignAggregateUDFinherits the defaultsupports_null_handling_clause, so producer overrides are lost across the FFI boundary.What changes are included in this PR?
supports_null_handling_clausethroughFFI_AggregateUDF.first_valueas the positive case andsumas the negative case in forced-foreign and dynamic-library tests.Are these changes tested?
cargo test -p datafusion-ffi --features integration-testscargo clippy --all-targets --all-features -- -D warningsAre there any user-facing changes?
The FFI ABI changes. Foreign libraries must rebuild against the new DataFusion version.