Several types of user-defined functions can be registered into a session context. Currently, the only implemented variety is an external pointer to a Rust FFI_ScalarUDF, an example of which is available from the DataFusion Python documentation.

sd_register_udf(udf)

sd_ctx_register_udf(ctx, udf)

Arguments

udf

An object of class 'datafusion_scalar_udf'

ctx

A SedonaDB context.

Value

NULL, invisibly