Skip to main content

ColumnarSegmentCursor

Trait ColumnarSegmentCursor 

Source
pub trait ColumnarSegmentCursor: Send {
    // Required methods
    fn schema(&self) -> SchemaRef;
    fn metadata_footprint_upper_bound(&self) -> u64;
    fn next_batch_plan(&self) -> Result<Option<ColumnarSegmentBatchPlan>>;
    fn next_batch(&mut self) -> Result<Option<RecordBatch>>;

    // Provided method
    fn close(&mut self) -> Result<()> { ... }
}
Expand description

Incremental batch source and stream contracts. One owned V08 columnar segment cursor supplied by an adapter crate.

The cursor exposes its next row-group bound before the DataFrame source invokes next_batch. This preserves the allocation-before-reservation contract without making alopex-dataframe depend on alopex-embedded.

Required Methods§

Source

fn schema(&self) -> SchemaRef

Schema fixed during bounded source open.

Source

fn metadata_footprint_upper_bound(&self) -> u64

Bytes still retained by source metadata after the cursor has opened.

Source

fn next_batch_plan(&self) -> Result<Option<ColumnarSegmentBatchPlan>>

Return the next row-group bound without fetching its chunks.

Source

fn next_batch(&mut self) -> Result<Option<RecordBatch>>

Fetch and decode exactly the row group described by next_batch_plan.

Provided Methods§

Source

fn close(&mut self) -> Result<()>

Release adapter-owned source handles. It is called at most once.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§