Skip to main content

read_version_diff

Function read_version_diff 

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

Reads only the rows added in a specific Delta Lake version.

Parses _delta_log/{version:020}.json for add actions, then reads only those Parquet files via the table’s object store. This is O(new_files) per version, not O(table_size).

For version 0, delegates to read_batches_at_version (full snapshot).

§Errors

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

Returns (batches, fully_consumed) — see read_batches_at_version.