Attributes
Every duckfn attribute, the arguments they share, the items they generate, and how auto-registration works.
Scalar functions
Return shapes, NULL handling, arity, overloads and named parameters for duckfn scalar functions.
Aggregate functions
Aggregate row handlers, state types, empty input semantics, parallel aggregation and the collect-then-compute shortcut (auto_collect).
Table functions
Row structs, the three iterator return shapes, named and optional parameters, and streaming.
Copy functions
Provide custom file formats for COPY ... TO and COPY ... FROM, driven by runtime dynamic columns.
SQL macros
Register scalar and table SQL macros â preferably from .sql files that are inlined at compile time.
Type casts
Override DuckDB's CAST behaviour for one source/target pair, including TRY_CAST and implicit conversion costs.
Replacement scans
Resolve a table name DuckDB cannot find â usually a file path â to one of your own table functions.
Type mapping
How DuckDB types map to Rust types, including LIST, MAP, ARRAY and STRUCT, plus the nullability rules and the gaps.
Errors and panics
Reporting a query error, returning NULL, and how Rust panics become DuckDB errors.
Custom types
Implement DuckValueType for your own types, and how to reach logical types duckfn does not map yet.
File system access
Read and write files through DuckDB's virtual file system â including s3:// and http(s):// â from aggregate functions and any other callback.