Repository navigation
feat(sql): add WebAssembly (WASM) scalar UDF support (#1653) - #2557
Open
properSkux wants to merge 1 commit into
Open
properSkux wants to merge 1 commit into
properSkux wants to merge 1 commit into
Conversation
- Add `UdfType::Wasm(WasmConfig)` to `dozer-types::models::udf_config` with `module` / `path` deserialization - Implement `dozer-sql-expression::wasm` module using `wasmi` with AssemblyScript `env.abort` support, signature & argument type validation, and SQL `NULL` propagation - Wire `Expression::WasmUdf` into `ExpressionBuilder::parse_sql_function` and `Expression::evaluate` behind the optional `wasm` feature across `dozer-sql-expression`, `dozer-sql`, and `dozer-cli` - Add unit tests for YAML config deserialization and WASM UDF evaluation Fixes getdozer#1653 Signed-off-by: Lucas Oliveira <kalopsia3445@gmail.com>
|
|
This branch has not been deployed
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.
Summary
Implements WebAssembly (WASM / AssemblyScript) User Defined Function (UDF) support in Dozer SQL (#1653):
Configuration (
dozer-types/src/models/udf_config.rs):UdfType::Wasm(WasmConfig)supporting bothmodule:andpath:YAML keys, resolving.wasmfiles directly or with an automatic.wasmextension fallback (e.g.udfs/wasm/my_function->udfs/wasm/my_function.wasm).WASM Runtime & Expression Integration (
dozer-sql/expression/src/wasm/):.wasmmodules viawasmibehind thewasmCargo feature flag (propagated throughdozer-sql-expression,dozer-sql, anddozer-cli).env.aborthost import so compiled AssemblyScript modules instantiate cleanly without extra glue code.i32,i64,f32,f64) against the SQLSchemaat query planning time, infers returnFieldType(Int/Float) and nullability, and propagates SQLNULLvalues during record evaluation.Tests:
dozer-types/src/tests/udf_yaml_deserialize.rs.NULLpropagation unit tests indozer-sql/expression/src/wasm/mod.rs.Fixes #1653
/claim #1653