Expand description
DuckDB table functions: functions used in a FROM clause that produce rows
and columns.
DuckDB table functions: functions used in a FROM clause that produce rows
and columns, e.g. SELECT * FROM my_func(1, 2).
Structs§
- Bind
Info - An interface to store and retrieve data during the table function’s bind stage.
- Init
Info - An interface to store and retrieve data during the table function’s init stage.
- Table
Function Info - An interface to store and retrieve data during the table function’s execution stage.
- Table
Init Data - The
InitDatashape shared by every#[duckdb_table_function]-generatedVTabimpl: a lazily consumed iterator of output rows, behind aMutexso it can be shared across the worker threads DuckDB may execute the scan on.
Traits§
- Table
Row - One output row of a table function: a tuple of values, one per column, in column order.
- VTab
- A DuckDB table function: produces rows and columns for use in a
FROMclause, e.g.SELECT * FROM my_func(1, 2). - VTab
Local Init - A
VTabthat also produces per-worker-thread (“local”) init data, in addition to the query-wide init data everyVTabalready produces.
Functions§
- run_
table_ func - Pulls up to
output.capacity()rows frominit_data’s iterator and writes them intooutput, then setsoutput’s row count. Exhaustion is signalled by writing fewer rows than the capacity (including zero), which is whatDataChunkHandle::set_lencommunicates to DuckDB either way.