Skip to content

feat(sql): add WebAssembly (WASM) scalar UDF support - #2532

Open
open5588 wants to merge 1 commit into
getdozer:mainfrom
open5588:feat/wasm-udf-support-1653
Open

open5588 wants to merge 1 commit into
getdozer:mainfrom
open5588:feat/wasm-udf-support-1653

Conversation

@open5588

@open5588 open5588 commented Oct 15, 2026 •

Copy link
Copy Markdown

/claim #1653

Summary

Adds WebAssembly (WASM) scalar User-Defined Function (UDF) support to Dozer SQL (#1653).

Changes

  1. Configuration & Schema (dozer-types, json_schemas/dozer.json):
    • Supports both the issue's shorthand mapping syntax:
      udfs:
        wasm:
          my_function: udfs/wasm/my_function
      and the tagged list syntax:
      udfs:
        - name: my_function
          config: !Wasm
            path: udfs/wasm/my_function
    • Adds configurable export, fuel (instruction budget), and memory_limit bounds on WasmConfig and updates json_schemas/dozer.json.
  2. Sandboxed WASM Execution in dozer-sql-expression & dozer-sql:
    • Uses wasmi to validate and execute exported WebAssembly functions with per-invocation store isolation, fuel metering, and memory/table growth limits.
    • Supports numeric (Int, Int8, I128, UInt, U128, Float) and Boolean scalar inputs with range/finiteness validation and NULL propagation.
    • Validates configured WASM UDFs at pipeline build time before streaming begins.
  3. Example & Tests:
    • Includes an AssemblyScript example in examples/wasm-udf and comprehensive unit and streaming DAG tests in dozer-types/src/tests/udf_yaml_deserialize.rs, dozer-sql/expression/src/wasm/tests.rs, and dozer-sql/src/tests/wasm_udf.rs.

Fixes #1653

@open5588
open5588 force-pushed the feat/wasm-udf-support-1653 branch from 85d0b15 to 5a3dafd Compare October 15, 2026 10:10
@CLAassistant

CLAassistant commented Oct 15, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Jason Wu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@open5588
open5588 force-pushed the feat/wasm-udf-support-1653 branch from 5a3dafd to fe94c11 Compare October 15, 2026 12:04

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WASM UDF support

2 participants