Skip to content
Query.Farm
Talk with Us

Protocol & Arrow

On this page

Wire shapes, the Arrow IPC helpers, and the numeric utilities.

source
pub struct AggregateBindParams {
pub request: Bytes,
}

Description

Params for the aggregate_bind RPC.

Derived schema must equal wire::params_schema_for("aggregate_bind").

source
pub struct AggregateBindRequest {
pub function_name: String,
pub arguments: Bytes,
pub input_schema: Option<Bytes>,
pub settings: Option<Bytes>,
pub secrets: Option<Bytes>,
pub attach_opaque_data: Option<Bytes>,
pub schema_name: Option<String>,
}

Description

AggregateBindRequest.

source
pub struct AggregateBindResponse {
pub output_schema: Bytes,
pub execution_id: Bytes,
}

Description

AggregateBindResponse.

source
pub struct AggregateCombineParams {
pub request: Bytes,
}

Description

Params for the aggregate_combine RPC.

Derived schema must equal wire::params_schema_for("aggregate_combine").

source
pub struct AggregateCombineRequest {
pub function_name: String,
pub execution_id: Bytes,
pub merge_batch: Bytes,
pub attach_opaque_data: Option<Bytes>,
pub schema_name: Option<String>,
}

Description

AggregateCombineRequest.

source
pub struct AggregateDestructorParams {
pub request: Bytes,
}

Description

Params for the aggregate_destructor RPC.

Derived schema must equal wire::params_schema_for("aggregate_destructor").

source
pub struct AggregateDestructorRequest {
pub function_name: String,
pub execution_id: Bytes,
pub schema_name: Option<String>,
}

Description

AggregateDestructorRequest.

source
pub struct AggregateFinalizeParams {
pub request: Bytes,
}

Description

Params for the aggregate_finalize RPC.

Derived schema must equal wire::params_schema_for("aggregate_finalize").

source
pub struct AggregateFinalizeRequest {
pub function_name: String,
pub execution_id: Bytes,
pub group_ids_batch: Bytes,
pub output_schema: Bytes,
pub attach_opaque_data: Option<Bytes>,
pub schema_name: Option<String>,
}

Description

AggregateFinalizeRequest.

source
pub struct AggregateFinalizeResponse {
pub result_batch: Bytes,
}

Description

AggregateFinalizeResponse.

source
pub struct AggregateStreamingChunkParams {
pub request: Bytes,
}

Description

Params for the aggregate_streaming_chunk RPC.

Derived schema must equal wire::params_schema_for("aggregate_streaming_chunk").

source
pub struct AggregateStreamingChunkRequest {
pub function_name: String,
pub execution_id: Bytes,
pub input_batch: Bytes,
pub attach_opaque_data: Option<Bytes>,
pub schema_name: Option<String>,
}

Description

aggregate_streaming_chunk — process one input chunk in a session.

source
pub struct AggregateStreamingChunkResponse {
pub result_batch: Bytes,
}

Description

aggregate_streaming_chunk result — a same-length output batch.

source
pub struct AggregateStreamingCloseParams {
pub request: Bytes,
}

Description

Params for the aggregate_streaming_close RPC.

Derived schema must equal wire::params_schema_for("aggregate_streaming_close").

source
pub struct AggregateStreamingCloseRequest {
pub function_name: String,
pub execution_id: Bytes,
pub attach_opaque_data: Option<Bytes>,
pub schema_name: Option<String>,
}

Description

aggregate_streaming_close — end a session and free its state.

source
pub struct AggregateStreamingOpenParams {
pub request: Bytes,
}

Description

Params for the aggregate_streaming_open RPC.

Derived schema must equal wire::params_schema_for("aggregate_streaming_open").

source
pub struct AggregateStreamingOpenRequest {
pub function_name: String,
pub arguments: Bytes,
pub input_schema: Bytes,
pub partition_key_count: i64,
pub order_key_count: i64,
pub output_schema: Bytes,
pub settings: Option<Bytes>,
pub secrets: Option<Bytes>,
pub attach_opaque_data: Option<Bytes>,
pub schema_name: Option<String>,
}

Description

aggregate_streaming_open — start a streaming-partitioned session.

source
pub struct AggregateStreamingOpenResponse {
pub execution_id: Bytes,
}

Description

aggregate_streaming_open result — the session token.

source
pub struct AggregateUpdateParams {
pub request: Bytes,
}

Description

Params for the aggregate_update RPC.

Derived schema must equal wire::params_schema_for("aggregate_update").

source
pub struct AggregateUpdateRequest {
pub function_name: String,
pub execution_id: Bytes,
pub input_batch: Bytes,
pub attach_opaque_data: Option<Bytes>,
pub schema_name: Option<String>,
}

Description

AggregateUpdateRequest.

source
pub struct AggregateWindowBatchParams {
pub request: Bytes,
}

Description

Params for the aggregate_window_batch RPC.

Derived schema must equal wire::params_schema_for("aggregate_window_batch").

source
pub struct AggregateWindowBatchRequest {
pub function_name: String,
pub execution_id: Bytes,
pub partition_id: i64,
pub row_idx: i64,
pub count: i64,
pub frames_per_row: Vec<i64>,
pub frame_starts: Vec<i64>,
pub frame_ends: Vec<i64>,
pub schema_name: Option<String>,
}

Description

aggregate_window_batch — evaluate count consecutive output rows.

source
pub struct AggregateWindowDestructorParams {
pub request: Bytes,
}

Description

Params for the aggregate_window_destructor RPC.

Derived schema must equal wire::params_schema_for("aggregate_window_destructor").

source
pub struct AggregateWindowDestructorRequest {
pub function_name: String,
pub execution_id: Bytes,
pub partition_id: i64,
pub schema_name: Option<String>,
}

Description

aggregate_window_destructor — drops a cached partition.

source
pub struct AggregateWindowInitParams {
pub request: Bytes,
}

Description

Params for the aggregate_window_init RPC.

Derived schema must equal wire::params_schema_for("aggregate_window_init").

source
pub struct AggregateWindowInitRequest {
pub function_name: String,
pub execution_id: Bytes,
pub partition_id: i64,
pub row_count: i64,
pub partition_batch: Bytes,
pub output_schema: Bytes,
pub filter_mask: Option<Bytes>,
pub frame_stats: Option<Bytes>,
pub all_valid: Option<Bytes>,
pub schema_name: Option<String>,
}

Description

aggregate_window_init — caches a partition for windowed evaluation.

source
pub struct AggregateWindowParams {
pub request: Bytes,
}

Description

Params for the aggregate_window RPC.

Derived schema must equal wire::params_schema_for("aggregate_window").

source
pub struct AggregateWindowRequest {
pub function_name: String,
pub execution_id: Bytes,
pub partition_id: i64,
pub rid: i64,
pub frame_starts: Vec<i64>,
pub frame_ends: Vec<i64>,
pub schema_name: Option<String>,
}

Description

aggregate_window — evaluate one output row over its sub-frames.

source
pub struct AggregateWindowResponse {
pub result_batch: Bytes,
}

Description

aggregate_window / aggregate_window_batch result.

source
pub struct AttachCatalogInfo {
pub alias: String,
pub target: String,
pub db_type: String,
pub options: StrMap,
pub hidden: bool,
pub required: bool,
pub secret_ref: String,
}

Description

A companion catalog the client should ATTACH when this VGI catalog attaches (lakehouse federation). IPC-serialized into CatalogAttachResult.attach_catalogs.

source
pub struct BindParams {
pub request: Bytes,
}

Description

Params for the bind RPC.

Derived schema must equal wire::params_schema_for("bind").

source
pub struct BindRequest {
pub function_name: String,
pub arguments: Bytes,
pub function_type: DictString,
pub input_schema: Option<Bytes>,
pub settings: Option<Bytes>,
pub secrets: Option<Bytes>,
pub attach_opaque_data: Option<Bytes>,
pub transaction_opaque_data: Option<Bytes>,
pub resolved_secrets_provided: bool,
pub at_unit: Option<String>,
pub at_value: Option<String>,
pub schema_name: Option<String>,
// NOTE: the `copy_from` / `copy_to` struct columns are intentionally NOT
// derived fields here. The C++ extension only appends them to the
// BindRequest schema for a COPY ... FROM / COPY ... TO scan (omitting them
// entirely for ordinary binds — matching Python's match-by-name /
// default-None semantics). The `VgiArrow` derive would reject the missing
// column, so they are read out-of-band via [`read_copy_from`] /
// [`read_copy_to`] from the request batch. See `dispatch.rs`.
}

Description

BindRequest — carried IPC-serialized inside the request binary column of bind, and as the nested bind_call struct of init / cardinality.

source
pub struct BindResponse {
pub output_schema: Bytes,
pub opaque_data: Bytes,
pub lookup_secret_types: Vec<String>,
pub lookup_scopes: Vec<String>,
pub lookup_names: Vec<String>,
}

Description

BindResponse — flat result of bind.

source
pub struct CardinalityRequest {
pub bind_call: Bytes,
pub bind_opaque_data: Option<Bytes>,
}

Description

Request for table_function_cardinality / table_function_statistics (boxes an IPC-serialized BindRequest).

source
pub struct CardinalityResponse {
pub estimate: Option<i64>,
pub max: Option<i64>,
}

Description

Response for table_function_cardinality.

source
pub struct CatalogAttachParams {
pub request: Bytes,
}

Description

Params for the catalog_attach RPC.

Derived schema must equal wire::params_schema_for("catalog_attach").

source
pub struct CatalogAttachRequest {
pub name: String,
pub options: Option<Bytes>,
pub data_version_spec: Option<String>,
pub implementation_version: Option<String>,
}

Description

CatalogAttachRequest — IPC-serialized inside request of catalog_attach.

source
pub struct CatalogAttachResult {
pub attach_opaque_data: Bytes,
pub supports_transactions: bool,
pub supports_time_travel: bool,
pub catalog_version_frozen: bool,
pub catalog_version: i64,
pub attach_opaque_data_required: bool,
pub default_schema: String,
pub settings: Vec<Bytes>,
pub secret_types: Vec<Bytes>,
pub attach_catalogs: Vec<Bytes>,
pub comment: Option<String>,
pub tags: StrMap,
pub supports_column_statistics: bool,
pub global_functions: Vec<Bytes>,
pub global_function_prefix: String,
pub resolved_data_version: Option<String>,
pub resolved_implementation_version: Option<String>,
}

Description

CatalogAttachResult — flat result of catalog_attach.

source
pub struct CatalogCopyFromFormatsParams {
pub attach_opaque_data: Bytes,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_copy_from_formats RPC.

Derived schema must equal wire::params_schema_for("catalog_copy_from_formats").

source
pub struct CatalogCreateParams {
pub request: Bytes,
}

Description

Params for the catalog_create RPC.

Derived schema must equal wire::params_schema_for("catalog_create").

source
pub struct CatalogDetachParams {
pub attach_opaque_data: Bytes,
}

Description

Params for the catalog_detach RPC.

Derived schema must equal wire::params_schema_for("catalog_detach").

source
pub struct CatalogDetachParams {
pub attach_opaque_data: Bytes,
}

Description

Flat params: catalog_detach.

source
pub struct CatalogDropParams {
pub name: String,
}

Description

Params for the catalog_drop RPC.

Derived schema must equal wire::params_schema_for("catalog_drop").

source
pub struct CatalogIndexCreateParams {
pub request: Bytes,
}

Description

Params for the catalog_index_create RPC.

Derived schema must equal wire::params_schema_for("catalog_index_create").

source
pub struct CatalogIndexDropParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub ignore_not_found: bool,
pub cascade: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_index_drop RPC.

Derived schema must equal wire::params_schema_for("catalog_index_drop").

source
pub struct CatalogIndexGetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_index_get RPC.

Derived schema must equal wire::params_schema_for("catalog_index_get").

source
pub struct CatalogInfo {
pub name: String,
pub implementation_version: Option<String>,
pub data_version_spec: Option<String>,
pub attach_option_specs: Vec<Bytes>,
pub releases: Vec<CatalogRelease>,
pub source_url: Option<String>,
}

Description

One catalog a worker advertises through catalog_catalogs.

The worker side builds this by hand in vgi::catalog::serialize_catalog_info; this struct is the reader a client needs, and the parity test in tests/catalog_info_parity.rs pins the two together against the generated schema.

source
pub struct CatalogMacroCreateParams {
pub request: Bytes,
}

Description

Params for the catalog_macro_create RPC.

Derived schema must equal wire::params_schema_for("catalog_macro_create").

source
pub struct CatalogMacroDropParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub ignore_not_found: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_macro_drop RPC.

Derived schema must equal wire::params_schema_for("catalog_macro_drop").

source
pub struct CatalogMacroGetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_macro_get RPC.

Derived schema must equal wire::params_schema_for("catalog_macro_get").

source
pub struct CatalogRelease {
pub version: String,
pub released_at: UtcTimestamp,
pub summary: String,
pub notes_url: Option<String>,
}

Description

One entry of CatalogInfo.releases — a published version of the catalog.

struct CatalogSchemaContentsFunctionsParams

Section titled “struct CatalogSchemaContentsFunctionsParams”
source
pub struct CatalogSchemaContentsFunctionsParams {
pub attach_opaque_data: Bytes,
pub name: String,
pub r#type: DictString,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_schema_contents_functions RPC.

Derived schema must equal wire::params_schema_for("catalog_schema_contents_functions").

struct CatalogSchemaContentsFunctionsParams

Section titled “struct CatalogSchemaContentsFunctionsParams”
source
pub struct CatalogSchemaContentsFunctionsParams {
pub attach_opaque_data: Bytes,
pub name: String,
pub r#type: DictString,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Flat params: catalog_schema_contents_functions (and _macros).

source
pub struct CatalogSchemaContentsIndexesParams {
pub attach_opaque_data: Bytes,
pub name: String,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_schema_contents_indexes RPC.

Derived schema must equal wire::params_schema_for("catalog_schema_contents_indexes").

source
pub struct CatalogSchemaContentsMacrosParams {
pub attach_opaque_data: Bytes,
pub name: String,
pub r#type: DictString,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_schema_contents_macros RPC.

Derived schema must equal wire::params_schema_for("catalog_schema_contents_macros").

source
pub struct CatalogSchemaContentsTablesParams {
pub attach_opaque_data: Bytes,
pub name: String,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_schema_contents_tables RPC.

Derived schema must equal wire::params_schema_for("catalog_schema_contents_tables").

source
pub struct CatalogSchemaContentsViewsParams {
pub attach_opaque_data: Bytes,
pub name: String,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_schema_contents_views RPC.

Derived schema must equal wire::params_schema_for("catalog_schema_contents_views").

source
pub struct CatalogSchemaCreateParams {
pub attach_opaque_data: Bytes,
pub name: String,
pub on_conflict: DictString,
pub comment: Option<String>,
pub tags: Option<StrMap>,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_schema_create RPC.

Derived schema must equal wire::params_schema_for("catalog_schema_create").

source
pub struct CatalogSchemaDropParams {
pub attach_opaque_data: Bytes,
pub name: String,
pub ignore_not_found: bool,
pub cascade: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_schema_drop RPC.

Derived schema must equal wire::params_schema_for("catalog_schema_drop").

source
pub struct CatalogSchemaGetParams {
pub attach_opaque_data: Bytes,
pub name: String,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_schema_get RPC.

Derived schema must equal wire::params_schema_for("catalog_schema_get").

source
pub struct CatalogSchemaNameParams {
pub attach_opaque_data: Bytes,
pub name: String,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Flat params: catalog_schema_get and the catalog_schema_contents_{tables, views,indexes} family (attach + name + optional tx).

source
pub struct CatalogSchemasParams {
pub attach_opaque_data: Bytes,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Flat params: catalog_schemas.

source
pub struct CatalogSchemasParams {
pub attach_opaque_data: Bytes,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_schemas RPC.

Derived schema must equal wire::params_schema_for("catalog_schemas").

source
pub struct CatalogTableColumnAddParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub column_definition: Bytes,
pub ignore_not_found: bool,
pub if_column_not_exists: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_column_add RPC.

Derived schema must equal wire::params_schema_for("catalog_table_column_add").

source
pub struct CatalogTableColumnCommentSetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub column_name: String,
pub comment: Option<String>,
pub ignore_not_found: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_column_comment_set RPC.

Derived schema must equal wire::params_schema_for("catalog_table_column_comment_set").

struct CatalogTableColumnDefaultDropParams

Section titled “struct CatalogTableColumnDefaultDropParams”
source
pub struct CatalogTableColumnDefaultDropParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub column_name: String,
pub ignore_not_found: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_column_default_drop RPC.

Derived schema must equal wire::params_schema_for("catalog_table_column_default_drop").

source
pub struct CatalogTableColumnDefaultSetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub column_name: String,
pub expression: String,
pub ignore_not_found: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_column_default_set RPC.

Derived schema must equal wire::params_schema_for("catalog_table_column_default_set").

source
pub struct CatalogTableColumnDropParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub column_name: String,
pub ignore_not_found: bool,
pub if_column_exists: bool,
pub cascade: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_column_drop RPC.

Derived schema must equal wire::params_schema_for("catalog_table_column_drop").

source
pub struct CatalogTableColumnRenameParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub column_name: String,
pub new_column_name: String,
pub ignore_not_found: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_column_rename RPC.

Derived schema must equal wire::params_schema_for("catalog_table_column_rename").

struct CatalogTableColumnStatisticsGetParams

Section titled “struct CatalogTableColumnStatisticsGetParams”
source
pub struct CatalogTableColumnStatisticsGetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_column_statistics_get RPC.

Derived schema must equal wire::params_schema_for("catalog_table_column_statistics_get").

source
pub struct CatalogTableColumnTypeChangeParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub column_definition: Bytes,
pub expression: Option<String>,
pub ignore_not_found: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_column_type_change RPC.

Derived schema must equal wire::params_schema_for("catalog_table_column_type_change").

source
pub struct CatalogTableCommentSetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub comment: Option<String>,
pub ignore_not_found: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_comment_set RPC.

Derived schema must equal wire::params_schema_for("catalog_table_comment_set").

source
pub struct CatalogTableCreateParams {
pub request: Bytes,
}

Description

Params for the catalog_table_create RPC.

Derived schema must equal wire::params_schema_for("catalog_table_create").

struct CatalogTableDeleteFunctionGetParams

Section titled “struct CatalogTableDeleteFunctionGetParams”
source
pub struct CatalogTableDeleteFunctionGetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_delete_function_get RPC.

Derived schema must equal wire::params_schema_for("catalog_table_delete_function_get").

source
pub struct CatalogTableDropParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub ignore_not_found: bool,
pub cascade: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_drop RPC.

Derived schema must equal wire::params_schema_for("catalog_table_drop").

source
pub struct CatalogTableGetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub at_unit: Option<String>,
pub at_value: Option<String>,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_get RPC.

Derived schema must equal wire::params_schema_for("catalog_table_get").

struct CatalogTableInsertFunctionGetParams

Section titled “struct CatalogTableInsertFunctionGetParams”
source
pub struct CatalogTableInsertFunctionGetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub transaction_opaque_data: Option<Bytes>,
pub writable_branch_function_name: Option<String>,
}

Description

Params for the catalog_table_insert_function_get RPC.

Derived schema must equal wire::params_schema_for("catalog_table_insert_function_get").

source
pub struct CatalogTableNotNullDropParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub column_name: String,
pub ignore_not_found: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_not_null_drop RPC.

Derived schema must equal wire::params_schema_for("catalog_table_not_null_drop").

source
pub struct CatalogTableNotNullSetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub column_name: String,
pub ignore_not_found: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_not_null_set RPC.

Derived schema must equal wire::params_schema_for("catalog_table_not_null_set").

source
pub struct CatalogTableRenameParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub new_name: String,
pub ignore_not_found: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_rename RPC.

Derived schema must equal wire::params_schema_for("catalog_table_rename").

source
pub struct CatalogTableScanBranchesGetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub at_unit: Option<String>,
pub at_value: Option<String>,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_scan_branches_get RPC.

Derived schema must equal wire::params_schema_for("catalog_table_scan_branches_get").

source
pub struct CatalogTableScanFunctionGetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub at_unit: Option<String>,
pub at_value: Option<String>,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_scan_function_get RPC.

Derived schema must equal wire::params_schema_for("catalog_table_scan_function_get").

struct CatalogTableUpdateFunctionGetParams

Section titled “struct CatalogTableUpdateFunctionGetParams”
source
pub struct CatalogTableUpdateFunctionGetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_table_update_function_get RPC.

Derived schema must equal wire::params_schema_for("catalog_table_update_function_get").

source
pub struct CatalogTransactionBeginParams {
pub attach_opaque_data: Bytes,
}

Description

Params for the catalog_transaction_begin RPC.

Derived schema must equal wire::params_schema_for("catalog_transaction_begin").

source
pub struct CatalogTransactionBeginParams {
pub attach_opaque_data: Bytes,
}

Description

Flat params: catalog_transaction_begin.

source
pub struct CatalogTransactionBeginResult {
pub transaction_opaque_data: Option<Bytes>,
}

Description

Flat result: catalog_transaction_begin.

source
pub struct CatalogTransactionCommitParams {
pub attach_opaque_data: Bytes,
pub transaction_opaque_data: Bytes,
}

Description

Params for the catalog_transaction_commit RPC.

Derived schema must equal wire::params_schema_for("catalog_transaction_commit").

source
pub struct CatalogTransactionEndParams {
pub attach_opaque_data: Bytes,
pub transaction_opaque_data: Bytes,
}

Description

Flat params: catalog_transaction_commit / _rollback.

source
pub struct CatalogTransactionRollbackParams {
pub attach_opaque_data: Bytes,
pub transaction_opaque_data: Bytes,
}

Description

Params for the catalog_transaction_rollback RPC.

Derived schema must equal wire::params_schema_for("catalog_transaction_rollback").

source
pub struct CatalogVersionParams {
pub attach_opaque_data: Bytes,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_version RPC.

Derived schema must equal wire::params_schema_for("catalog_version").

source
pub struct CatalogVersionParams {
pub attach_opaque_data: Bytes,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Flat params: catalog_version.

source
pub struct CatalogVersionResult {
pub version: i64,
}

Description

Flat result: catalog_version.

source
pub struct CatalogViewCommentSetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub comment: Option<String>,
pub ignore_not_found: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_view_comment_set RPC.

Derived schema must equal wire::params_schema_for("catalog_view_comment_set").

source
pub struct CatalogViewCreateParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub definition: String,
pub on_conflict: DictString,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_view_create RPC.

Derived schema must equal wire::params_schema_for("catalog_view_create").

source
pub struct CatalogViewDropParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub ignore_not_found: bool,
pub cascade: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_view_drop RPC.

Derived schema must equal wire::params_schema_for("catalog_view_drop").

source
pub struct CatalogViewGetParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_view_get RPC.

Derived schema must equal wire::params_schema_for("catalog_view_get").

source
pub struct CatalogViewRenameParams {
pub attach_opaque_data: Bytes,
pub schema_name: String,
pub name: String,
pub new_name: String,
pub ignore_not_found: bool,
pub transaction_opaque_data: Option<Bytes>,
}

Description

Params for the catalog_view_rename RPC.

Derived schema must equal wire::params_schema_for("catalog_view_rename").

source
pub struct CopyFromContext {
pub format: String,
pub file_path: String,
pub expected_schema: Bytes,
}

Description

CopyFromContext — the COPY ... FROM context threaded onto a [BindRequest] when a bind/init opens a custom COPY-FROM scan. Present only for COPY-FROM (the copy_from field is None otherwise). Encoded on the wire as a nested struct column (not IPC binary), matching the Python vgi.protocol.CopyFromContext. The handler’s options arrive through the normal [BindRequest::arguments], so they are not duplicated here.

source
pub struct CopyFromFormatInfo {
pub comment: Option<String>,
pub tags: StrMap,
pub format_name: String,
pub handler: String,
pub options: Bytes,
pub direction: String,
pub description: String,
pub ordered: bool,
}

Description

CopyFromFormatInfo item — a custom COPY ... FROM format advertised by a catalog via catalog_copy_from_formats. Field order/names mirror the Python vgi.catalog.catalog_interface.CopyFromFormatInfo (inherits comment / tags from CatalogObject). The C++ extension reads each field by name.

source
pub struct CopyToContext {
pub format: String,
pub file_path: String,
}

Description

CopyToContext — the COPY ... TO context threaded onto a [BindRequest] when a bind/init opens a custom COPY-TO sink. Present only for COPY-TO (the copy_to field is None otherwise). Encoded on the wire as a nested struct column (not IPC binary), matching the Python vgi.protocol.CopyToContext. The handler’s options arrive through the normal [BindRequest::arguments]; the source columns ride the existing [BindRequest::input_schema], so neither is duplicated here.

source
pub struct DynamicToStringRequest {
pub bind_call: Bytes,
pub bind_opaque_data: Option<Bytes>,
pub global_execution_id: Bytes,
}

Description

table_function_dynamic_to_string — post-execution profiling info.

source
pub struct DynamicToStringResponse {
pub keys: Vec<String>,
pub values: Vec<String>,
}

Description

table_function_dynamic_to_string result — ordered key/value pairs surfaced as Extra Info under EXPLAIN ANALYZE.

source
pub struct FunctionExample {
pub sql: String,
pub description: String,
pub expected_output: Option<String>,
}

Description

One examples entry of FunctionInfo.

source
pub struct FunctionInfo {
pub comment: Option<String>,
pub tags: StrMap,
pub name: String,
pub schema_name: String,
pub function_type: DictString,
pub arguments: Bytes,
pub output_schema: Bytes,
pub stability: Option<DictString>,
pub null_handling: Option<DictString>,
pub description: String,
pub examples: Vec<FunctionExample>,
pub categories: Vec<String>,
pub projection_pushdown: Option<bool>,
pub filter_pushdown: Option<bool>,
pub sampling_pushdown: Option<bool>,
pub late_materialization: Option<bool>,
pub supported_expression_filters: Vec<String>,
pub order_preservation: Option<DictString>,
pub max_workers: i32,
pub supports_batch_index: bool,
pub partition_kind: DictString,
pub order_dependent: DictString,
pub distinct_dependent: DictString,
pub supports_window: bool,
pub streaming_partitioned: bool,
pub has_finalize: bool,
pub source_order_dependent: bool,
pub sink_order_dependent: bool,
pub requires_input_batch_index: bool,
pub input_from_args: bool,
pub required_settings: Vec<String>,
pub required_secrets: Vec<RequiredSecret>,
}

Description

FunctionInfo item — describes a function to DuckDB.

source
pub struct GlobalInitResponse {
pub execution_id: Bytes,
pub max_workers: i64,
pub opaque_data: Option<Bytes>,
}

Description

GlobalInitResponse — the streaming header for init.

source
pub struct InitParams {
pub request: Bytes,
}

Description

Params for the init RPC.

Derived schema must equal wire::params_schema_for("init").

source
pub struct InitRequest {
pub bind_call: Bytes,
pub output_schema: Bytes,
pub bind_opaque_data: Option<Bytes>,
pub projection_ids: Option<Vec<i64>>,
pub pushdown_filters: Option<LargeBytes>,
pub join_keys: Option<Vec<LargeBytes>>,
pub phase: Option<DictString>,
pub execution_id: Option<Bytes>,
pub init_opaque_data: Option<Bytes>,
pub substream_id: Option<Bytes>,
pub order_by_column_name: Option<String>,
pub order_by_direction: Option<DictString>,
pub order_by_null_order: Option<DictString>,
pub order_by_limit: Option<i64>,
pub tablesample_percentage: Option<f64>,
pub tablesample_seed: Option<i64>,
pub finalize_state_id: Option<Bytes>,
}

Description

InitRequest — carried IPC-serialized inside the request binary column of init. bind_call is itself an IPC-serialized [BindRequest] (Python serializes nested dataclasses as binary), decoded separately.

source
pub struct InlineI64(pub Option<i64>);

Description

An optionally-inlined int64 whose wire field is declared non-nullable (the C++ extension’s result-schema check requires int64 not null) yet may carry a NULL value. The extension reads it via row[...].as<int64_t>(), which yields nullopt for NULL — its signal for “not inlined, fire the RPC”. Matches the canonical convention (null in a non-nullable column).

source
pub type IntMap = Vec<(String, i64)>;

Description

map<utf8, int64> payload.

source
pub struct ItemsResult {
pub items: Vec<Bytes>,
}

Description

Shared flat result for every catalog_*_get / _contents_* method: items is a list of IPC-serialized item structs.

source
pub struct MacroInfo {
pub comment: Option<String>,
pub tags: StrMap,
pub name: String,
pub schema_name: String,
pub macro_type: DictString,
pub parameters: Vec<String>,
pub parameter_default_values: Bytes,
pub definition: String,
pub arguments_schema: Bytes,
}

Description

MacroInfo item.

source
pub struct RequiredSecret {
pub secret_type: String,
pub scope: Option<String>,
pub secret_name: Option<String>,
}

Description

One required_secrets entry of FunctionInfo.

source
pub struct ScanBranch {
pub function_name: String,
pub arguments: Bytes,
pub branch_filter: Option<String>,
pub writable: bool,
pub source_catalog: Option<String>,
pub source_schema: Option<String>,
pub source_table: Option<String>,
}

Description

One physical source backing a (possibly multi-branch) table scan.

A branch is either a function branch (function_name names a table function) or a catalog-table branch (function_name is empty and source_table is set — it scans source_catalog.source_schema.source_table in a companion catalog).

source
pub struct ScanBranchesResult {
pub branches: Vec<Bytes>,
pub required_extensions: Vec<String>,
}

Description

Response for catalog_table_scan_branches_get. The branches list must be non-empty (one entry per physical source; single-source tables return one).

source
pub struct ScanFunctionResult {
pub function_name: String,
pub arguments: Bytes,
pub required_extensions: Vec<String>,
}

Description

ScanFunctionResult — names the table function that scans a catalog table.

source
pub struct SchemaInfo {
pub comment: Option<String>,
pub tags: StrMap,
pub attach_opaque_data: Bytes,
pub name: String,
pub estimated_object_count: Option<IntMap>,
}

Description

SchemaInfo item.

source
pub struct SecretTypeWire {
pub name: String,
pub description: String,
pub parameters_schema: Bytes,
}

Description

Secret-type registration entry, IPC-serialized into CatalogAttachResult.secret_types.

source
pub type StrMap = Vec<(String, String)>;

Description

map<utf8, utf8> payload (Python-canonical keys/values child names).

source
pub struct TableBufferingCombineParams {
pub request: Bytes,
}

Description

Params for the table_buffering_combine RPC.

Derived schema must equal wire::params_schema_for("table_buffering_combine").

source
pub struct TableBufferingCombineRequest {
pub function_name: String,
pub execution_id: Bytes,
pub state_ids: Vec<Bytes>,
pub attach_opaque_data: Option<Bytes>,
pub transaction_id: Option<Bytes>,
pub schema_name: Option<String>,
}

Description

TableBufferingCombineRequest.

source
pub struct TableBufferingCombineResponse {
pub finalize_state_ids: Vec<Bytes>,
}

Description

TableBufferingCombineResponse.

source
pub struct TableBufferingDestructorParams {
pub request: Bytes,
}

Description

Params for the table_buffering_destructor RPC.

Derived schema must equal wire::params_schema_for("table_buffering_destructor").

source
pub struct TableBufferingDestructorRequest {
pub function_name: String,
pub execution_id: Bytes,
pub schema_name: Option<String>,
}

Description

TableBufferingDestructorRequest.

source
pub struct TableBufferingProcessParams {
pub request: Bytes,
}

Description

Params for the table_buffering_process RPC.

Derived schema must equal wire::params_schema_for("table_buffering_process").

source
pub struct TableBufferingProcessRequest {
pub function_name: String,
pub execution_id: Bytes,
pub input_batch: Bytes,
pub attach_opaque_data: Option<Bytes>,
pub transaction_id: Option<Bytes>,
pub batch_index: Option<i64>,
pub schema_name: Option<String>,
}

Description

TableBufferingProcessRequest — sink one batch.

source
pub struct TableBufferingProcessResponse {
pub state_id: Bytes,
}

Description

TableBufferingProcessResponse.

source
pub struct TableCardinality {
pub estimate: Option<i64>,
pub max: Option<i64>,
}

Description

Flat result: table_function_cardinality.

source
pub struct TableFunctionCardinalityParams {
pub request: Bytes,
}

Description

Params for the table_function_cardinality RPC.

Derived schema must equal wire::params_schema_for("table_function_cardinality").

source
pub struct TableFunctionDynamicToStringParams {
pub request: Bytes,
}

Description

Params for the table_function_dynamic_to_string RPC.

Derived schema must equal wire::params_schema_for("table_function_dynamic_to_string").

source
pub struct TableFunctionStatisticsParams {
pub request: Bytes,
}

Description

Params for the table_function_statistics RPC.

Derived schema must equal wire::params_schema_for("table_function_statistics").

source
pub struct TableInfo {
pub comment: Option<String>,
pub tags: StrMap,
pub name: String,
pub schema_name: String,
pub columns: Bytes,
pub not_null_constraints: Vec<i32>,
pub unique_constraints: Vec<Vec<i32>>,
pub check_constraints: Vec<String>,
pub primary_key_constraints: Vec<Vec<i32>>,
pub foreign_key_constraints: Vec<Bytes>,
pub supports_insert: bool,
pub supports_update: bool,
pub supports_delete: bool,
pub supports_returning: bool,
pub supports_column_statistics: bool,
pub scan_function: Bytes,
pub insert_function: Bytes,
pub update_function: Bytes,
pub delete_function: Bytes,
pub cardinality_estimate: InlineI64,
pub cardinality_max: InlineI64,
pub column_statistics: Bytes,
pub bind_result: Bytes,
pub required_filters: Vec<Vec<String>>,
}

Description

TableInfo item — describes a catalog table to DuckDB.

source
pub const VGI_PROTOCOL_NAME: &str = “VgiProtocol”;

Description

RPC protocol name; must match the Python VgiProtocol.

source
pub const VGI_PROTOCOL_VERSION: &str = “1.3.0”;

Description

VgiProtocol.protocol_version in vgi-python. 1.1.0 added schema_name to BindRequest; 1.2.0 adds it to the 15 unary requests that re-resolve the function by name, so a name declared in two schemas cannot mis-route at runtime after binding correctly. 1.3.0 adds global_functions and global_function_prefix to CatalogAttachResult — functions a worker asks the client to publish into its global namespace.

source
pub struct ViewInfo {
pub comment: Option<String>,
pub tags: StrMap,
pub name: String,
pub schema_name: String,
pub definition: String,
pub column_comments: StrMap,
}

Description

ViewInfo item.

source
pub fn add_two(params: &ProcessParams, batch: &RecordBatch) -> Result<RecordBatch>

Description

Add the first two input columns (cast to the bound output type).

source
pub fn aggregate_bind_params_schema() -> SchemaRef

Description

Origin: method ‘aggregate_bind’ params

source
pub fn aggregate_bind_result_schema() -> SchemaRef

Description

Origin: method ‘aggregate_bind’ result

source
pub fn aggregate_combine_params_schema() -> SchemaRef

Description

Origin: method ‘aggregate_combine’ params

source
pub fn aggregate_combine_result_schema() -> SchemaRef

Description

Origin: method ‘aggregate_combine’ result

function aggregate_destructor_params_schema

Section titled “function aggregate_destructor_params_schema”
source
pub fn aggregate_destructor_params_schema() -> SchemaRef

Description

Origin: method ‘aggregate_destructor’ params

function aggregate_destructor_result_schema

Section titled “function aggregate_destructor_result_schema”
source
pub fn aggregate_destructor_result_schema() -> SchemaRef

Description

Origin: method ‘aggregate_destructor’ result

source
pub fn aggregate_finalize_params_schema() -> SchemaRef

Description

Origin: method ‘aggregate_finalize’ params

source
pub fn aggregate_finalize_result_schema() -> SchemaRef

Description

Origin: method ‘aggregate_finalize’ result

function aggregate_streaming_chunk_params_schema

Section titled “function aggregate_streaming_chunk_params_schema”
source
pub fn aggregate_streaming_chunk_params_schema() -> SchemaRef

Description

Origin: method ‘aggregate_streaming_chunk’ params

function aggregate_streaming_chunk_result_schema

Section titled “function aggregate_streaming_chunk_result_schema”
source
pub fn aggregate_streaming_chunk_result_schema() -> SchemaRef

Description

Origin: method ‘aggregate_streaming_chunk’ result

function aggregate_streaming_close_params_schema

Section titled “function aggregate_streaming_close_params_schema”
source
pub fn aggregate_streaming_close_params_schema() -> SchemaRef

Description

Origin: method ‘aggregate_streaming_close’ params

function aggregate_streaming_close_result_schema

Section titled “function aggregate_streaming_close_result_schema”
source
pub fn aggregate_streaming_close_result_schema() -> SchemaRef

Description

Origin: method ‘aggregate_streaming_close’ result

function aggregate_streaming_open_params_schema

Section titled “function aggregate_streaming_open_params_schema”
source
pub fn aggregate_streaming_open_params_schema() -> SchemaRef

Description

Origin: method ‘aggregate_streaming_open’ params

function aggregate_streaming_open_result_schema

Section titled “function aggregate_streaming_open_result_schema”
source
pub fn aggregate_streaming_open_result_schema() -> SchemaRef

Description

Origin: method ‘aggregate_streaming_open’ result

source
pub fn aggregate_update_params_schema() -> SchemaRef

Description

Origin: method ‘aggregate_update’ params

source
pub fn aggregate_update_result_schema() -> SchemaRef

Description

Origin: method ‘aggregate_update’ result

function aggregate_window_batch_params_schema

Section titled “function aggregate_window_batch_params_schema”
source
pub fn aggregate_window_batch_params_schema() -> SchemaRef

Description

Origin: method ‘aggregate_window_batch’ params

function aggregate_window_batch_result_schema

Section titled “function aggregate_window_batch_result_schema”
source
pub fn aggregate_window_batch_result_schema() -> SchemaRef

Description

Origin: method ‘aggregate_window_batch’ result

function aggregate_window_destructor_params_schema

Section titled “function aggregate_window_destructor_params_schema”
source
pub fn aggregate_window_destructor_params_schema() -> SchemaRef

Description

Origin: method ‘aggregate_window_destructor’ params

function aggregate_window_destructor_result_schema

Section titled “function aggregate_window_destructor_result_schema”
source
pub fn aggregate_window_destructor_result_schema() -> SchemaRef

Description

Origin: method ‘aggregate_window_destructor’ result

function aggregate_window_init_params_schema

Section titled “function aggregate_window_init_params_schema”
source
pub fn aggregate_window_init_params_schema() -> SchemaRef

Description

Origin: method ‘aggregate_window_init’ params

function aggregate_window_init_result_schema

Section titled “function aggregate_window_init_result_schema”
source
pub fn aggregate_window_init_result_schema() -> SchemaRef

Description

Origin: method ‘aggregate_window_init’ result

source
pub fn aggregate_window_params_schema() -> SchemaRef

Description

Origin: method ‘aggregate_window’ params

source
pub fn aggregate_window_result_schema() -> SchemaRef

Description

Origin: method ‘aggregate_window’ result

source
pub fn arc_schema(schema: Schema) -> SchemaRef

Description

Convenience: wrap a schema in an Arc.

source
pub fn array_value_f64(arr: &ArrayRef, i: usize) -> Option<f64>

Description

Read any numeric array element widened to f64 (None if null).

source
pub fn array_value_i64(arr: &ArrayRef, i: usize) -> Option<i64>

Description

Read any integer/float array element widened to i64 (None if null).

source
pub fn attach_catalog_info_schema() -> SchemaRef

Description

Origin: AttachCatalogInfo

source
pub fn backfill_bind_request(
batch: arrow_array::RecordBatch,
) -> Result<(arrow_array::RecordBatch, bool)>

Description

Backfill the [BindRequest] columns a newer protocol revision added, so a request from an older client still decodes.

The derived decoder resolves fields by name and errors on a missing column, but the canonical Python BindRequest is a dataclass with defaults: a field the client omits simply takes its default. schema_name (protocol 1.1.0) is such a field — an extension built before it never emits the column. Append a null one so the by-name decode yields None, which resolution already treats as “the caller named no schema”. Returns the batch alongside whether the column had to be synthesised — true means the peer predates 1.1.0 and omits the field entirely, which is a different situation from a 1.1.0 peer that sent the column as null. Only the latter is a statement about this bind.

source
pub fn bind_params_schema() -> SchemaRef

Description

Origin: method ‘bind’ params

source
pub fn bind_result_schema() -> SchemaRef

Description

Origin: method ‘bind’ result

source
pub fn catalog_attach_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_attach’ params

source
pub fn catalog_attach_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_attach’ result

source
pub fn catalog_catalogs_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_catalogs’ params

source
pub fn catalog_catalogs_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_catalogs’ result

function catalog_copy_from_formats_params_schema

Section titled “function catalog_copy_from_formats_params_schema”
source
pub fn catalog_copy_from_formats_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_copy_from_formats’ params

function catalog_copy_from_formats_result_schema

Section titled “function catalog_copy_from_formats_result_schema”
source
pub fn catalog_copy_from_formats_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_copy_from_formats’ result

source
pub fn catalog_create_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_create’ params

source
pub fn catalog_detach_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_detach’ params

source
pub fn catalog_drop_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_drop’ params

function catalog_index_create_params_schema

Section titled “function catalog_index_create_params_schema”
source
pub fn catalog_index_create_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_index_create’ params

source
pub fn catalog_index_drop_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_index_drop’ params

source
pub fn catalog_index_get_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_index_get’ params

source
pub fn catalog_index_get_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_index_get’ result

source
pub fn catalog_info_schema() -> SchemaRef

Description

Origin: CatalogInfo

function catalog_macro_create_params_schema

Section titled “function catalog_macro_create_params_schema”
source
pub fn catalog_macro_create_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_macro_create’ params

source
pub fn catalog_macro_drop_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_macro_drop’ params

source
pub fn catalog_macro_get_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_macro_get’ params

source
pub fn catalog_macro_get_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_macro_get’ result

function catalog_schema_contents_functions_params_schema

Section titled “function catalog_schema_contents_functions_params_schema”
source
pub fn catalog_schema_contents_functions_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_schema_contents_functions’ params

function catalog_schema_contents_functions_result_schema

Section titled “function catalog_schema_contents_functions_result_schema”
source
pub fn catalog_schema_contents_functions_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_schema_contents_functions’ result

function catalog_schema_contents_indexes_params_schema

Section titled “function catalog_schema_contents_indexes_params_schema”
source
pub fn catalog_schema_contents_indexes_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_schema_contents_indexes’ params

function catalog_schema_contents_indexes_result_schema

Section titled “function catalog_schema_contents_indexes_result_schema”
source
pub fn catalog_schema_contents_indexes_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_schema_contents_indexes’ result

function catalog_schema_contents_macros_params_schema

Section titled “function catalog_schema_contents_macros_params_schema”
source
pub fn catalog_schema_contents_macros_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_schema_contents_macros’ params

function catalog_schema_contents_macros_result_schema

Section titled “function catalog_schema_contents_macros_result_schema”
source
pub fn catalog_schema_contents_macros_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_schema_contents_macros’ result

function catalog_schema_contents_tables_params_schema

Section titled “function catalog_schema_contents_tables_params_schema”
source
pub fn catalog_schema_contents_tables_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_schema_contents_tables’ params

function catalog_schema_contents_tables_result_schema

Section titled “function catalog_schema_contents_tables_result_schema”
source
pub fn catalog_schema_contents_tables_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_schema_contents_tables’ result

function catalog_schema_contents_views_params_schema

Section titled “function catalog_schema_contents_views_params_schema”
source
pub fn catalog_schema_contents_views_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_schema_contents_views’ params

function catalog_schema_contents_views_result_schema

Section titled “function catalog_schema_contents_views_result_schema”
source
pub fn catalog_schema_contents_views_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_schema_contents_views’ result

function catalog_schema_create_params_schema

Section titled “function catalog_schema_create_params_schema”
source
pub fn catalog_schema_create_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_schema_create’ params

function catalog_schema_drop_params_schema

Section titled “function catalog_schema_drop_params_schema”
source
pub fn catalog_schema_drop_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_schema_drop’ params

source
pub fn catalog_schema_get_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_schema_get’ params

source
pub fn catalog_schema_get_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_schema_get’ result

source
pub fn catalog_schemas_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_schemas’ params

source
pub fn catalog_schemas_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_schemas’ result

function catalog_table_column_add_params_schema

Section titled “function catalog_table_column_add_params_schema”
source
pub fn catalog_table_column_add_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_column_add’ params

function catalog_table_column_comment_set_params_schema

Section titled “function catalog_table_column_comment_set_params_schema”
source
pub fn catalog_table_column_comment_set_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_column_comment_set’ params

function catalog_table_column_default_drop_params_schema

Section titled “function catalog_table_column_default_drop_params_schema”
source
pub fn catalog_table_column_default_drop_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_column_default_drop’ params

function catalog_table_column_default_set_params_schema

Section titled “function catalog_table_column_default_set_params_schema”
source
pub fn catalog_table_column_default_set_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_column_default_set’ params

function catalog_table_column_drop_params_schema

Section titled “function catalog_table_column_drop_params_schema”
source
pub fn catalog_table_column_drop_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_column_drop’ params

function catalog_table_column_rename_params_schema

Section titled “function catalog_table_column_rename_params_schema”
source
pub fn catalog_table_column_rename_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_column_rename’ params

function catalog_table_column_statistics_get_params_schema

Section titled “function catalog_table_column_statistics_get_params_schema”
source
pub fn catalog_table_column_statistics_get_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_column_statistics_get’ params

function catalog_table_column_type_change_params_schema

Section titled “function catalog_table_column_type_change_params_schema”
source
pub fn catalog_table_column_type_change_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_column_type_change’ params

function catalog_table_comment_set_params_schema

Section titled “function catalog_table_comment_set_params_schema”
source
pub fn catalog_table_comment_set_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_comment_set’ params

function catalog_table_create_params_schema

Section titled “function catalog_table_create_params_schema”
source
pub fn catalog_table_create_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_create’ params

function catalog_table_delete_function_get_params_schema

Section titled “function catalog_table_delete_function_get_params_schema”
source
pub fn catalog_table_delete_function_get_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_delete_function_get’ params

source
pub fn catalog_table_drop_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_drop’ params

source
pub fn catalog_table_get_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_get’ params

source
pub fn catalog_table_get_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_get’ result

function catalog_table_insert_function_get_params_schema

Section titled “function catalog_table_insert_function_get_params_schema”
source
pub fn catalog_table_insert_function_get_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_insert_function_get’ params

function catalog_table_not_null_drop_params_schema

Section titled “function catalog_table_not_null_drop_params_schema”
source
pub fn catalog_table_not_null_drop_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_not_null_drop’ params

function catalog_table_not_null_set_params_schema

Section titled “function catalog_table_not_null_set_params_schema”
source
pub fn catalog_table_not_null_set_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_not_null_set’ params

function catalog_table_rename_params_schema

Section titled “function catalog_table_rename_params_schema”
source
pub fn catalog_table_rename_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_rename’ params

function catalog_table_scan_branches_get_params_schema

Section titled “function catalog_table_scan_branches_get_params_schema”
source
pub fn catalog_table_scan_branches_get_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_scan_branches_get’ params

function catalog_table_scan_function_get_params_schema

Section titled “function catalog_table_scan_function_get_params_schema”
source
pub fn catalog_table_scan_function_get_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_scan_function_get’ params

function catalog_table_update_function_get_params_schema

Section titled “function catalog_table_update_function_get_params_schema”
source
pub fn catalog_table_update_function_get_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_table_update_function_get’ params

function catalog_transaction_begin_params_schema

Section titled “function catalog_transaction_begin_params_schema”
source
pub fn catalog_transaction_begin_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_transaction_begin’ params

function catalog_transaction_begin_result_schema

Section titled “function catalog_transaction_begin_result_schema”
source
pub fn catalog_transaction_begin_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_transaction_begin’ result

function catalog_transaction_commit_params_schema

Section titled “function catalog_transaction_commit_params_schema”
source
pub fn catalog_transaction_commit_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_transaction_commit’ params

function catalog_transaction_rollback_params_schema

Section titled “function catalog_transaction_rollback_params_schema”
source
pub fn catalog_transaction_rollback_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_transaction_rollback’ params

source
pub fn catalog_version_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_version’ params

source
pub fn catalog_version_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_version’ result

function catalog_view_comment_set_params_schema

Section titled “function catalog_view_comment_set_params_schema”
source
pub fn catalog_view_comment_set_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_view_comment_set’ params

function catalog_view_create_params_schema

Section titled “function catalog_view_create_params_schema”
source
pub fn catalog_view_create_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_view_create’ params

source
pub fn catalog_view_drop_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_view_drop’ params

source
pub fn catalog_view_get_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_view_get’ params

source
pub fn catalog_view_get_result_schema() -> SchemaRef

Description

Origin: method ‘catalog_view_get’ result

function catalog_view_rename_params_schema

Section titled “function catalog_view_rename_params_schema”
source
pub fn catalog_view_rename_params_schema() -> SchemaRef

Description

Origin: method ‘catalog_view_rename’ params

source
pub fn common_type_for_addition(a: &DataType, b: &DataType) -> DataType

Description

Common addition type for two inputs: the numeric common type of the two, then promoted for overflow headroom (matches Python _promote_for_addition(pc.add(nulls(t1), nulls(t2)).type)).

source
pub fn copy_from_format_info_schema() -> SchemaRef

Description

Origin: CopyFromFormatInfo

source
pub fn dict(s: &str) -> DictString

Description

Build a DictString from a &str.

source
pub fn double_first(params: &ProcessParams, batch: &RecordBatch) -> Result<RecordBatch>

Description

Double the first input column (cast to the bound output type, add to self, cast back so Arrow’s decimal widening doesn’t drift the result type).

source
pub fn empty_result_batch() -> Result<RecordBatch>

Description

The {result: binary} envelope wrapping an empty (0-column) response — used by methods whose response DTO has no fields (aggregate update/combine).

source
pub fn ensure_schema_name(
batch: arrow_array::RecordBatch,
) -> Result<(arrow_array::RecordBatch, bool)>

Description

Append a null schema_name column when the request batch lacks one, so a request from a peer that predates the field still decodes (the VgiArrow derive resolves fields by name and errors on a missing column, while the canonical Python request dataclasses default it to None).

Every request that gained schema_name did so as an additive nullable column: BindRequest in protocol 1.1.0, the 15 unary requests that re-resolve by name in 1.2.0. A pre-1.1.0 peer omits it from BindRequest; a pre-1.2.0 peer omits it from the unary requests — the same shape, so one helper serves both. Returns whether the column had to be synthesised, which distinguishes a peer that predates the field (absent) from one that sent it null (present) — a statement about the peer, not about this call.

source
pub fn flat_schema<T: VgiArrow>() -> SchemaRef

Description

The flat Arrow schema for DTO T — one column per struct field.

T::arrow_data_type() must be a Struct; the struct’s children become the schema’s top-level fields.

source
pub fn from_batch<T: VgiArrow>(batch: &RecordBatch) -> Result<T>

Description

Parse DTO T out of the request’s 1-row [RecordBatch].

Columns are matched by name (extra columns are ignored, missing required columns error), so wire column ordering is irrelevant.

source
pub fn function_info_schema() -> SchemaRef

Description

Origin: FunctionInfo

source
pub fn index_info_schema() -> SchemaRef

Description

Origin: IndexInfo

source
pub fn init_params_schema() -> SchemaRef

Description

Origin: method ‘init’ params

source
pub fn macro_info_schema() -> SchemaRef

Description

Origin: MacroInfo

source
pub fn params_schema_for(method: &str) -> SchemaRef

Description

Advertised params schema for an RPC method.

__describe__ has to state these: a client that builds its request from the advertised schema — the TypeScript client does — otherwise sends a metadata-only batch and every handler reports a missing column.

The table is generated from the canonical Python VgiProtocol ([crate::generated::protocol_schemas]), so it covers every method rather than the hand-maintained subset this used to carry. Methods whose params are the single wrapped request column resolve to that envelope through the generated table; an entirely unknown method — a peer speaking a newer protocol — falls back to the envelope too, which is the safe assumption.

source
pub fn params_schema_for(method: &str) -> Option<SchemaRef>

Description

Params schema for an RPC method, or None when the method is unknown to this protocol version.

Callers that need a total function should fall back to the wrapped request envelope, which is what an unrecognised method carries.

source
pub fn promote_for_addition(ty: &DataType) -> DataType

Description

Promote a numeric type for addition/doubling, matching Python _promote_for_addition: integers widen to the next size, floats to float64, decimals gain one digit of precision (capped at 38).

source
pub fn read_batch(bytes: &[u8]) -> Result<RecordBatch>

Description

Read the first record batch from an Arrow IPC stream.

Uses vgi_rpc’s nullability-relaxing reader because the C++ extension and pyarrow declare Annotated[T | None] DTO fields as nullable=false yet legitimately send null values; arrow-rust’s strict reader would reject them. relax_nullability() promotes every field to nullable before the batch is constructed, matching the canonical wire behavior.

source
pub fn read_copy_from(batch: &arrow_array::RecordBatch) -> Result<Option<CopyFromContext>>

Description

Read the optional copy_from nested-struct column from a (flat) BindRequest batch. Returns None when the column is absent (ordinary bind) or null.

source
pub fn read_copy_to(batch: &arrow_array::RecordBatch) -> Result<Option<CopyToContext>>

Description

Read the optional copy_to nested-struct column from a (flat) BindRequest batch. Returns None when the column is absent (ordinary bind) or null.

source
pub fn read_schema(bytes: &[u8]) -> Result<SchemaRef>

Description

Read the schema of an Arrow IPC stream without requiring a batch.

source
pub fn read_struct<T: VgiArrow>(arr: &dyn Array, idx: usize) -> Result<T>

Description

Parse DTO T out of an arbitrary row of a [StructArray] column (used for nested struct columns in list/struct DTOs).

source
pub fn register(srv: &mut RpcServer, disp: Arc<Dispatcher>)

Description

Register all VGI methods against srv, backed by disp.

source
pub fn request_binary_schema() -> SchemaRef

Description

The wire params envelope every unary VGI method takes: a single request binary column holding an IPC-encoded inner batch.

This is what __describe__ must advertise. A client that builds its request from the advertised schema (the TypeScript client does) sends a metadata-only batch against an empty advertised schema, and the handler then reports a missing request column.

source
pub fn result_batch_from_bytes(bytes: &[u8]) -> Result<RecordBatch>

Description

Wrap already-serialized IPC bytes in the {result: binary} envelope (for methods whose result is a pre-built batch, e.g. column statistics).

source
pub fn result_binary_schema() -> SchemaRef

Description

The schema of every unary response: a single result: binary column.

The canonical wire wraps unary results as one result column holding the IPC-serialized flat DTO batch; the flat DTO schema is the schema of those inner bytes, not of the response batch itself.

source
pub fn scan_branch_schema() -> SchemaRef

Description

Origin: ScanBranch

source
pub fn scan_branches_result_schema() -> SchemaRef

Description

Origin: ScanBranchesResult

source
pub fn scan_function_result_schema() -> SchemaRef

Description

Origin: ScanFunctionResult

source
pub fn schema_info_schema() -> SchemaRef

Description

Origin: SchemaInfo

function table_buffering_combine_params_schema

Section titled “function table_buffering_combine_params_schema”
source
pub fn table_buffering_combine_params_schema() -> SchemaRef

Description

Origin: method ‘table_buffering_combine’ params

function table_buffering_combine_result_schema

Section titled “function table_buffering_combine_result_schema”
source
pub fn table_buffering_combine_result_schema() -> SchemaRef

Description

Origin: method ‘table_buffering_combine’ result

function table_buffering_destructor_params_schema

Section titled “function table_buffering_destructor_params_schema”
source
pub fn table_buffering_destructor_params_schema() -> SchemaRef

Description

Origin: method ‘table_buffering_destructor’ params

function table_buffering_destructor_result_schema

Section titled “function table_buffering_destructor_result_schema”
source
pub fn table_buffering_destructor_result_schema() -> SchemaRef

Description

Origin: method ‘table_buffering_destructor’ result

function table_buffering_process_params_schema

Section titled “function table_buffering_process_params_schema”
source
pub fn table_buffering_process_params_schema() -> SchemaRef

Description

Origin: method ‘table_buffering_process’ params

function table_buffering_process_result_schema

Section titled “function table_buffering_process_result_schema”
source
pub fn table_buffering_process_result_schema() -> SchemaRef

Description

Origin: method ‘table_buffering_process’ result

function table_function_cardinality_params_schema

Section titled “function table_function_cardinality_params_schema”
source
pub fn table_function_cardinality_params_schema() -> SchemaRef

Description

Origin: method ‘table_function_cardinality’ params

function table_function_cardinality_result_schema

Section titled “function table_function_cardinality_result_schema”
source
pub fn table_function_cardinality_result_schema() -> SchemaRef

Description

Origin: method ‘table_function_cardinality’ result

function table_function_dynamic_to_string_params_schema

Section titled “function table_function_dynamic_to_string_params_schema”
source
pub fn table_function_dynamic_to_string_params_schema() -> SchemaRef

Description

Origin: method ‘table_function_dynamic_to_string’ params

function table_function_dynamic_to_string_result_schema

Section titled “function table_function_dynamic_to_string_result_schema”
source
pub fn table_function_dynamic_to_string_result_schema() -> SchemaRef

Description

Origin: method ‘table_function_dynamic_to_string’ result

function table_function_statistics_params_schema

Section titled “function table_function_statistics_params_schema”
source
pub fn table_function_statistics_params_schema() -> SchemaRef

Description

Origin: method ‘table_function_statistics’ params

source
pub fn table_info_schema() -> SchemaRef

Description

Origin: TableInfo

source
pub fn to_batch<T: VgiArrow>(value: T) -> Result<RecordBatch>

Description

Serialize value into a 1-row [RecordBatch] with [flat_schema].

source
pub fn to_result_batch<T: VgiArrow>(value: T) -> Result<RecordBatch>

Description

Serialize a response DTO into the wire {result: binary} envelope.

source
pub fn view_info_schema() -> SchemaRef

Description

Origin: ViewInfo

source
macro_rules! wasm_worker {
(
$( init = $init:path, )?
$( first_serve = $first_serve:path, )?
build = $build:path
$(,)?
) => {
// Worker-side ring ops, implemented in the emscripten `--js-library`
// (`vgi_worker_lib.js`) — the page half of the transport ABI.
extern "C" {
fn vgi_sab_worker_read(slot: i32, dst: *mut u8, n: i32) -> i32;
fn vgi_sab_worker_write(slot: i32, src: *const u8, n: i32) -> i32;
fn vgi_sab_worker_close(slot: i32);
fn vgi_worker_await_slot(slot: i32);
fn vgi_worker_await_release(slot: i32);
}
struct __VgiSabReader {
slot: i32,
}
impl ::std::io::Read for __VgiSabReader {
fn read(&mut self, buf: &mut [u8]) -> ::std::io::Result<usize> {
let n = unsafe { vgi_sab_worker_read(self.slot, buf.as_mut_ptr(), buf.len() as i32) };
if n < 0 {
return Err(::std::io::Error::other("vgi sab ring read failed"));
}
Ok(n as usize)
}
}
struct __VgiSabWriter {
slot: i32,
}
impl ::std::io::Write for __VgiSabWriter {
fn write(&mut self, buf: &[u8]) -> ::std::io::Result<usize> {
let n = unsafe { vgi_sab_worker_write(self.slot, buf.as_ptr(), buf.len() as i32) };
if n < 0 {
return Err(::std::io::Error::other("vgi sab ring write failed"));
}
Ok(n as usize)
}
fn flush(&mut self) -> ::std::io::Result<()> {
// The ring has no buffering of its own — writes land in shared memory.
Ok(())
}
}
fn __vgi_first_serve_once() {
$(
static ONCE: ::std::sync::Once = ::std::sync::Once::new();
ONCE.call_once(|| { $first_serve(); });
)?
}
fn __vgi_serve_slot(slot: i32) {
// A panic must not escape the `extern "C"` frame below: that is a
// nounwind context, so Rust turns it into an immediate `abort()` that
// tears down the whole module — every serve thread and the DuckDB
// engine with it. Catch it, log it, and close the slot so the client
// sees a failed stream instead.
let result = ::std::panic::catch_unwind(::std::panic::AssertUnwindSafe(|| {
__vgi_first_serve_once();
let worker: $crate::Worker = $build();
worker.serve_reader_writer(__VgiSabReader { slot }, __VgiSabWriter { slot });
}));
if let Err(payload) = result {
let msg = payload
.downcast_ref::<&str>()
.map(|s| (*s).to_string())
.or_else(|| payload.downcast_ref::<String>().cloned())
.unwrap_or_else(|| "<non-string panic payload>".to_string());
::std::eprintln!("[vgi] worker panic on slot {slot}: {msg}");
}
unsafe { vgi_sab_worker_close(slot) };
}
pub extern "C" fn vgi_worker_init() {
$( $init(); )?
}
pub extern "C" fn vgi_worker_serve_sab_slot(slot: i32) {
__vgi_serve_slot(slot);
}
pub extern "C" fn vgi_worker_serve_pool(n_slots: i32) {
for slot in 0..n_slots {
::std::thread::spawn(move || loop {
unsafe { vgi_worker_await_slot(slot) };
__vgi_serve_slot(slot);
unsafe { vgi_worker_await_release(slot) };
});
}
}
};
}

Description

Generate the canonical browser worker: entry points for a VGI worker.

See the module docs for the fields and hook semantics. build is required; init and first_serve are optional and must appear in the order shown (init, then first_serve, then build). Expands to nothing on non-wasm32 targets.

The macro emits a few private helper items (a __VgiSab* reader/writer and helper fns) plus the three #[no_mangle] exports into the invocation scope; invoke it at most once per crate.

source
pub fn write_batch(batch: &RecordBatch) -> Result<Vec<u8>>

Description

Serialize a record batch to an Arrow IPC stream (schema + batch + EOS).

source
pub fn write_batch_with_schema(batch: &RecordBatch, schema: &Schema) -> Result<Vec<u8>>

Description

Like [write_batch] but emits the IPC schema message from schema instead of batch.schema(). The columns are written as-is. Used to declare a column non-nullable on the wire while its array still carries NULLs (arrow’s safe constructors reject this, but the C++ extension requires it for inlined optimizer hints — see catalog::serialize_items).

source
pub fn write_schema(schema: &Schema) -> Result<Vec<u8>>

Description

Serialize a bare schema to an Arrow IPC stream (schema message + EOS).

source
pub fn write_schema_ref(schema: &SchemaRef) -> Result<Vec<u8>>

Description

Convenience: serialize a [SchemaRef].