Skip to content

refactor(io): Replace deprecated ParquetObjectReader with our own AsyncFileReader - #563

Merged
kylebarron merged 2 commits into
mainfrom
kyle/parquet-async-file-reader
Oct 28, 2026
Merged

kylebarron merged 2 commits into
mainfrom
kyle/parquet-async-file-reader

Conversation

@kylebarron

Copy link
Copy Markdown
Owner

Note

This PR was written by Claude (Claude Code), not by @kylebarron.

read_parquet_async now reads through arro3-io's own AsyncFileReader instead of parquet's ParquetObjectReader, which parquet deprecated in 59.2.0 (apache/arrow-rs#10308).

  • arro3-io/src/object_store_reader.rs is copied from parquet 60.1's examples/object_store.rs, which the deprecation note points to. The only change is pub(crate) on the struct and its new.
  • The #[allow(deprecated)] on read_parquet_async_inner is gone.
  • arro3-io enables parquet/async instead of parquet/object_store, so parquet no longer depends on object_store. arro3-io's object_store version no longer has to match parquet's, only pyo3-object_store's.
  • read_parquet_async gets its first test, test_read_parquet_async. The first commit adds it on its own, and it passes both before and after the change.

Closes #561

Behavior

There's no behavior change for arro3. Like ParquetObjectReader without a file size, which is how arro3 used it, the new reader reads the footer with suffix range requests and makes no head request. It wraps object_store errors in ParquetError::External, the same as parquet's From impl.

A probe script gave identical output with the old and new builds. It checked the values and schema metadata of a file with two row groups, plus the errors for a missing file (in a LocalStore and a MemoryStore), an empty file, a 4-byte file, and a corrupt footer.

Testing

  • The root workspace steps of ci.yml pass locally: cargo fmt, cargo clippy --all --all-features --tests -- -D warnings, cargo check --all --all-features, and cargo test. So does cargo check -p arro3-io --no-default-features.
  • pytest tests passes locally on Python 3.13 (macOS arm64), 209 passed. pytest-freethreaded runs each test 200 times across 10 threads there.

🤖 Written by Claude Code

kylebarron and others added 2 commits October 28, 2026 16:14
`read_parquet_async` had no Python test. Write a Parquet file to a
temporary directory, read it back through a `LocalStore`, and compare it
with the original table, schema metadata included.

`read_parquet_async` needs a running event loop when it is called, so
the test awaits it inside a coroutine that it passes to `asyncio.run`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ader

parquet deprecated `ParquetObjectReader` in 59.2.0 in favor of
implementing `AsyncFileReader` directly, and plans to remove its
object_store integration altogether (apache/arrow-rs#10308). Copy the
`ObjectStoreReader` from parquet's `examples/object_store.rs` and read
through it in `read_parquet_async`. This removes the
`#[allow(deprecated)]`.

The reader does what `ParquetObjectReader` did for us: it doesn't know
the file size, so it reads the footer with suffix range requests, and it
wraps object_store errors in `ParquetError::External`. The returned
table, its schema metadata, and error messages are unchanged.

arro3-io now enables parquet's `async` feature instead of its
`object_store` feature, so parquet no longer depends on object_store.
That decouples arro3-io's object_store version, which has to match
pyo3-object_store's, from parquet's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@kylebarron kylebarron left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅

@kylebarron
kylebarron merged commit 35733b4 into main Oct 28, 2026
22 checks passed
@kylebarron
kylebarron deleted the kyle/parquet-async-file-reader branch October 28, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace the deprecated ParquetObjectReader in read_parquet_async

1 participant