Skip to content
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 for user defined FFI functions #1215

Open
westhide opened this issue Mar 23, 2025 · 3 comments
Open

Support for user defined FFI functions #1215

westhide opened this issue Mar 23, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@westhide
Copy link
Contributor

westhide commented Mar 23, 2025

Description

Support transport UDF FFI library from client to Scheduler&Executor, and provoid interface load FFI into TaskDefinition's function_registry.
Relate to 2.2 Support for user defined functions

Describe the solution you'd like

1. Rust FFI

Datafusion already support loading rust FFI module, base on abi_stable

For rust ABI, we can send rust FFI library from client side to Scheduler&Executor, and load udf functiuons from the FFI library.

2. C/C++ FFI

For C/C++ FFI, we can provide a interface wrapper base on rust FFI by use cxx crate.

3. Wasm FFI

As @drauschenbach suggest, WASM is possible way to express UDF's in Rust. We can consider provide wasmtime udf for better secure and standards-compliant.

Describe alternatives you've considered

N/A

Additional context

N/A

@westhide westhide added the enhancement New feature or request label Mar 23, 2025
@westhide westhide changed the title Support transport UDF FFI library from client to Scheduler&Executor, and provoid interface load FFI into TaskDefinition function_registry Support transport UDF FFI library from client to Scheduler&Executor, and provoid interface load FFI into TaskDefinition's function_registry Mar 23, 2025
@westhide westhide changed the title Support transport UDF FFI library from client to Scheduler&Executor, and provoid interface load FFI into TaskDefinition's function_registry Support for user defined FFI functions Mar 23, 2025
@milenkovicm
Copy link
Contributor

I'm not sure what's your idea @westhide, udf support is not one size fits all solution, thus I'm not sure how it fits with current solution. We spent a lot of time removing code, I'd be careful adding code.

Can you please elaborate a bit more?

@unknown-no
Copy link

Related WASM UDFs

@westhide
Copy link
Contributor Author

westhide commented Mar 29, 2025

Consider implement wasm UDF with Zero-copy Apache Arrow with WebAssembly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants