Skip to main content

read_batches_at_version

Function read_batches_at_version 

Source
pub async fn read_batches_at_version(
    table: &mut DeltaTable,
    version: i64,
    max_records: usize,
) -> Result<Vec<RecordBatch>, ConnectorError>
Expand description

Reads record batches from a specific Delta Lake table version.

Loads the requested version, applies a LIMIT to bound memory usage, then streams results via execute_stream to avoid materializing the entire version in memory.

§Arguments

  • table - Mutable reference to the Delta Lake table handle
  • version - The table version to read
  • max_records - Maximum number of records to return. Pass usize::MAX to read all records (unbounded).

§Errors

Returns ConnectorError::ReadError if the version cannot be loaded or scanned.