-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Overview
DuckDB::TableFunction and its related classes (BindInfo, InitInfo, FunctionInfo) are missing several features from the DuckDB C API. This issue tracks the full list.
Currently implemented
| Class | Methods |
|---|---|
TableFunction |
name=, add_parameter, add_named_parameter, bind, init, execute |
BindInfo |
parameter_count, get_parameter, get_named_parameter, add_result_column, set_cardinality, set_error |
InitInfo |
set_error |
FunctionInfo |
set_error |
Missing from DuckDB::TableFunction
-
local_init(&block)— wrapduckdb_table_function_set_local_init. Enables per-thread local initialization for parallel execution. -
supports_projection_pushdown(bool)— wrapduckdb_table_function_supports_projection_pushdown. Tells DuckDB the function can skip columns not needed by the query.
Missing from DuckDB::BindInfo
-
get_extra_info— wrapduckdb_bind_get_extra_info. Retrieve extra info set on the function viaset_extra_info. -
set_bind_data(data, destroy)— wrapduckdb_bind_set_bind_data. Store user data during bind phase for use in init/execute callbacks. -
get_client_context— wrapduckdb_table_function_get_client_context. Provides access to the client connection context during bind.
Missing from DuckDB::InitInfo
-
get_extra_info— wrapduckdb_init_get_extra_info. Retrieve extra info set on the function. -
get_bind_data— wrapduckdb_init_get_bind_data. Access data stored during the bind phase. -
set_init_data(data, destroy)— wrapduckdb_init_set_init_data. Store init state for use in the execute callback. -
column_count— wrapduckdb_init_get_column_count. Number of columns DuckDB actually needs (for projection pushdown). -
column_index(i)— wrapduckdb_init_get_column_index. Which column index DuckDB needs (for projection pushdown). -
set_max_threads(n)— wrapduckdb_init_set_max_threads. Controls parallelism for table function execution.
Missing from DuckDB::FunctionInfo
-
get_bind_data— wrapduckdb_function_get_bind_data. Access bind-phase user data in the execute callback. -
get_init_data— wrapduckdb_function_get_init_data. Access init-phase data in the execute callback. -
get_local_init_data— wrapduckdb_function_get_local_init_data. Access per-thread local init data in the execute callback (parallel execution).
Priority notes
BindInfo#set_bind_data+FunctionInfo#get_bind_data— highest value; enables stateful functions that compute schema dynamically at bind time and pass state to execute- Projection pushdown (
supports_projection_pushdown+InitInfo#column_count/column_index) — significant performance feature for large tables; allows skipping unneeded columns entirely local_init+get_local_init_data— needed for correct parallel execution support
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request