Skip to content

Replace deprecated ParquetObjectReader with a hand-written AsyncFileReader #86

Description

@jspaezp

parquet 59 deprecates ParquetObjectReader. Upstream's replacement is not a
rename — you implement AsyncFileReader yourself
(apache/arrow-rs#10308).

Three #[allow(deprecated)] currently hold the line:

  • rust/timscentroid/src/storage.rsread_parquet_peaks
  • rust/timscentroid/src/lazy/query.rsParquetQuerier::new_async, ParquetQuerier::query_async

What the replacement has to cover

AsyncFileReader requires get_bytes and get_metadata. The catch is
get_byte_ranges: its default implementation is serial —

for range in ranges {
    let data = self.get_bytes(range).await?;
    result.push(data);
}

ParquetObjectReader overrides it with ObjectStore::get_ranges, which fetches
concurrently. Taking the default would serialize every column-chunk fetch, so
the override is required, not optional. ParquetObjectReader also does metadata
suffix-prefetch and caching worth matching.

So the work is roughly:

  • get_bytesObjectStore::get_range
  • get_byte_rangesObjectStore::get_ranges (must stay concurrent)
  • get_metadataParquetMetaDataReader with a suffix prefetch hint

Verifying it

Parquet reads here go through InstrumentedStore, whose counters now have test
coverage in rust/timscentroid/src/instrumentation.rs. A regression in fetch
batching shows up as a higher get_count for the same read, which is worth
asserting so a serial get_byte_ranges cannot land unnoticed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions