@terascope/data-mate / teal-frame/scalar-function
teal-frame/scalar-function
Interfaces
| Interface | Description |
|---|---|
| ScalarFunctionSpec | - |
Type Aliases
ScalarFunctionImpl
ScalarFunctionImpl = (
value,index) =>unknown
Defined in: data-mate/src/teal-frame/scalar-function.ts:12
A per-value implementation, matching what FieldTransformConfig.create /
FieldValidateConfig.create return: (value, index) => result.
Parameters
| Parameter | Type |
|---|---|
value | unknown |
index | number |
Returns
unknown
Variables
ARGUMENT_SETS_KEPT
constARGUMENT_SETS_KEPT:256=256
Defined in: data-mate/src/teal-frame/scalar-function.ts:65
How many argument sets' implementations one UDF keeps; the least recently used is dropped.
Functions
createScalarFunction()
createScalarFunction(
spec):DuckDBScalarFunction
Defined in: data-mate/src/teal-frame/scalar-function.ts:92
Wraps a per-row JS function as a vectorized DuckDB scalar function.
The binding is chunk-based (mainFunction(info, chunk, outputVector)), so the JS boundary is
crossed once per chunk of about 2048 rows, not once per row.
Parameters
| Parameter | Type |
|---|---|
spec | ScalarFunctionSpec |
Returns
DuckDBScalarFunction