Results of 1 - 3 of about 3 for vtab (0.001 sec.)
- Rust Client 10826
- Installation To use the DuckDB Rust client, visit the Rust installation page . The latest stable version of the DuckDB Rust client is 2.0.0. The DuckDB Rust client, duckdb-rs , is an ergonomic wrapper over the DuckDB C API that exposes an i
...ind Cargo features that are off by default. Enable them in the dependency declaration, for example features = ["bundled", "vtab", "appender-arrow"] . The following is the complete set of the crate's Cargo features, grouped by purpose. Building DuckDB...mits. tpch The TPC-H benchmark extension. tpcds The TPC-DS benchmark extension. Table and Scalar Functions Feature Enables vtab Base support for table functions . vtab-arrow Apache Arrow integration for table functions, converting between an Arrow Re...cordBatch and DuckDB data chunks. Implies vtab . vscalar Scalar functions . Implies vtab-arrow . vscalar-arrow Arrow-optimized scalar functions, intended for use alongsi... - https://man.mtool.work/duckdb/2.0/clients/rust/overview.html
- Write User Defined Functions 10361
- Overview The Rust client can register user-defined functions written in Rust: scalar functions with the vscalar feature and table functions with the vtab feature. Both operate on DuckDB's columnar data chunks, so a single call processes a b
...onnection, Result, core::{DataChunkHandle, LogicalTypeHandle, LogicalTypeId}, vscalar::{ScalarFunctionSignature, VScalar}, vtab::arrow::WritableVector, }; struct AddOne; impl VScalar for AddOne { // No per-function state is needed. type State = (); f...'s validity. This feature requires features = ["vscalar"] . Table Functions A table function is a type that implements the VTab trait, registered with register_table_function() and queried like any other table. VTab splits the work across three callb...s done, so a large result is delivered over several calls. parameters declares the function's parameter types. The crate's vtab example defines a numbers(BIGINT) function that returns one row per integer in 0..count , over columns of increasing compl... - https://man.mtool.work/duckdb/2.0/clients/rust/functions.html
- Handle Results 6678
- Overview Beyond reading a result set row by row , the Rust client can hand a query result to Apache Arrow as a stream of record batches, register an Arrow batch as a queryable table, and return results as Polars data frames. Each of these c
...cordBatch produced elsewhere in a Rust program can be registered as a DuckDB table function and queried in SQL. Enable the vtab-arrow feature, register the built-in ArrowVTab table function on the connection, and pass the batch as a query parameter w...ith arrow_recordbatch_to_query_params() . The following is adapted from the crate's arrow_vtab example : use duckdb::{Connection, arrow::record_batch::RecordBatch}; use duckdb::vtab::arrow::{arrow_recordbatch_to_query..._params, ArrowVTab}; let conn = Connection::open_in_memory()?; conn.register_table_function::<ArrowVTab>("arrow")?; let params = arrow_record... - https://man.mtool.work/duckdb/2.0/clients/rust/result_handling.html
PREV
1
NEXT
DuckDB 2.0 Documentation / man.mtool.work