FFI: plumb with_updated_config for FFI_ScalarUDF#22797
Open
Amogh-2404 wants to merge 1 commit into
Open
Conversation
part of apache#22330. adds the `with_updated_config` fn pointer so a provider's override survives the FFI boundary instead of silently falling back to the trait default (None) on the consumer side. the config crosses in via the existing FFI_ConfigOptions and the reconfigured udf comes back as FFI_Option<FFI_ScalarUDF>. covered by a forced-foreign unit test and a cross-cdylib integration test that both assert the override crosses.
|
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 close?
Part of #22330.
Rationale for this change
FFI_ScalarUDFdoesn't plumbwith_updated_config, so a provider that overrides it has the override silently dropped across the FFI boundary — the consumer falls back to the trait default (None). Continues the method-coverage work started withplacement(#22608).What changes are included in this PR?
with_updated_configfn pointer toFFI_ScalarUDFplus the wrapper and forwarding on both sides. Config crosses in via the existingFFI_ConfigOptions; the reconfigured UDF comes back asFFI_Option<FFI_ScalarUDF>.Adding the field changes the
#[repr(C)]layout, so this is an ABI change.Are these changes tested?
Yes —
cargo test -p datafusion-ffi --features integration-tests.Are there any user-facing changes?
ABI change for FFI consumers (recompile required). No SQL-level changes.