Registers an R function as a DuckDB table function. The R function is called on
the recorded R thread to produce either a finite result (a data frame or named
list of equal-length columns) or a
rducks_table_stream() producer for
scan-time batches. Column types are inferred from the returned columns, and the
extension fills DuckDB output vectors directly from the R columns, with no
wire serialization for the in-process scan.
Arguments
- con
A
duckdb_connection.- name
SQL table function name.
- fun
R function returning a data frame, named list of columns, or
rducks_table_stream(). Its finite formal argument count defines the SQL positional argument count; each positional argument is registered as DuckDBANYand converted at bind time from the actual SQL value.- chunk_size
Maximum number of rows emitted per DuckDB output chunk. Must be an integer from 1 to 1024.