parse_legacy_and_upgrade

Function parse_legacy_and_upgrade 

Source
pub fn parse_legacy_and_upgrade(
    metadata_bytes: &[u8],
    num_rows: i64,
) -> Result<ParquetMetaData, Error>
Expand description

Parse legacy metadata (Arrow 56.0) and convert to new format (Arrow 57.0)

This function handles the migration from Arrow 56.0 to 57.0 by:

  1. Parsing legacy metadata using the deprecated thrift API
  2. Injecting the required num_rows field if missing or zero
  3. Re-serializing with thrift to produce corrected bytes
  4. Parsing with Arrow 57.0’s standard parser