Expand description
Pre-processor for CREATE FUNCTION … RETURNS TABLE DDL.
DataFusion does not natively understand the Krishiv-extended
CREATE FUNCTION … RETURNS TABLE (col TYPE, …) LANGUAGE … AS '…' syntax.
This module intercepts such statements before they reach DataFusion and
registers a TableUdf backed by either:
- A SQL body (
LANGUAGE sql AS '…') — executed via the session context. - A runtime-provided Rust closure — registered via
SqlEngine::register_table_udf_fn.
Unsupported DDL languages are rejected before any registry mutation.
Structs§
- Closure
Table Udf - A
TableUdfbacked by a runtime-provided Rust closure. - Column
Def - A column definition extracted from the
RETURNS TABLE (…)clause. - Create
Function Ddl - Parsed descriptor produced by
parse_create_function. - Function
ArgDef - A typed function argument extracted from the function signature.
- SqlBody
Table Udf - A
TableUdfwhose body is a SQL query executed via a DataFusion session.
Functions§
- is_
create_ function_ returns_ table - Return
trueifsqllooks like aCREATE FUNCTION … RETURNS TABLE …statement (case-insensitive, leading/trailing whitespace allowed). - parse_
create_ function - Parse a
CREATE FUNCTION … RETURNS TABLE (…)statement and return aCreateFunctionDdldescriptor.
Type Aliases§
- Udtf
Body Fn - Body-function type alias for runtime-registered UDTFs.