Skip to main content

Module batch_builder

Module batch_builder 

Source
Expand description

Single-row RecordBatch / stream builders shared by loader adapters.

uni-plugin-rhai’s procedure adapter materializes the plugin’s returned rows into one RecordBatch and then wraps it in a RecordBatchStreamAdapter yielding exactly one item. The 1-batch stream pattern is generic and unrelated to rhai. This module hosts the shared implementation so future adapters (custom in-process procedures, builtin synthetic catalogs) reuse it.

These helpers are pure Arrow utilities; they do not depend on any plugin-loader feature gate.

Functions§

batch_into_stream
Wrap a single RecordBatch in a one-item SendableRecordBatchStream.
single_row_record_batch
Construct a single-row RecordBatch from the supplied schema and column arrays.