Skip to main content

PendingRowsBatcher

Trait PendingRowsBatcher 

Source
pub trait PendingRowsBatcher: Send + Sync {
    // Required methods
    fn acquire<'life0, 'async_trait>(
        &'life0 self,
        estimated_bytes: usize,
        held_bytes: u64,
    ) -> Pin<Box<dyn Future<Output = Result<PendingRowsPermit>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn submit<'life0, 'async_trait>(
        &'life0 self,
        table_info: TableInfoRef,
        batch: RecordBatch,
        ctx: QueryContextRef,
        permit: PendingRowsPermit,
    ) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn memory_limit_bytes(&self) -> u64 { ... }
}
Expand description

Accepts prepared table writes without coupling the inserter to a batcher implementation. Schema creation, alteration and default evaluation remain the caller’s responsibility.

Required Methods§

Source

fn acquire<'life0, 'async_trait>( &'life0 self, estimated_bytes: usize, held_bytes: u64, ) -> Pin<Box<dyn Future<Output = Result<PendingRowsPermit>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Admits an original request before conversion, retaining its slot and estimated Arrow memory across all table submissions. Memory acquisition must not wait because the caller can already hold transport and decoded-row reservations. held_bytes counts those reservations, which cannot be released during conversion.

Source

fn submit<'life0, 'async_trait>( &'life0 self, table_info: TableInfoRef, batch: RecordBatch, ctx: QueryContextRef, permit: PendingRowsPermit, ) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Submits rows according to the acknowledgement policy, retaining the slot until writing completes even when the response acknowledges queue admission only. Cancelling the response wait does not retract an already enqueued submission. Early acknowledgements retain actual storage results in the output metadata.

Provided Methods§

Source

fn memory_limit_bytes(&self) -> u64

Returns the conversion memory limit, or zero when byte admission is disabled.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§