Skip to main content

parsed_from_v2

Function parsed_from_v2 

Source
pub fn parsed_from_v2(
    batch: &RecordBatch,
    target: Magic,
) -> Result<Vec<ParsedRecord>, LegacyRecordsError>
Expand description

Iterate the v2 batch’s records and drop control batches entirely.

Each emitted ParsedRecord gets its absolute offset as base_offset + offset_delta. For a v1 target, each record also gets its absolute timestamp as base_timestamp + timestamp_delta.

§Errors

Returns an error if an absolute offset or timestamp exceeds i64.