perf(parquet): scope exact metadata reads by storage capability - #686
perf(parquet): scope exact metadata reads by storage capability#686JunRuiLee wants to merge 4 commits into
Conversation
|
How about object store? |
Good point. I revised the implementation so exact metadata reads are opt-in through an explicit
The capability is decided in the storage/IO layer and propagated to the Parquet reader. Tests cover backend classification, capability propagation, exact reads, and retained prefetch. We have only benchmarked HDFS so far, so preserving the existing behavior for object stores and unknown custom backends is intentional. |
|
Thanks for revising the object-store behavior. I traced the change from First, Second, the policy currently expands a public, format-agnostic API for a single private Parquet consumer. A smaller design would keep the classification crate-private:
|
Purpose
Linked issue: close #687
Use an explicit range-read capability to choose the Parquet metadata loading strategy:
OpenDAL's HDFS native service keeps a file-scoped positioned-read handle, so exact range reads reuse the same underlying HDFS file reader. The capability is determined in the IO/storage layer and propagated through
InputFileReader; the Parquet layer does not infer the backend from URI strings. CustomFileReadimplementations may explicitly opt in, while the default remains conservative.Performance validation
A local HDFS comparison showed better read performance with exact range reads than with the fixed 512 KiB prefetch. Object stores and caller-provided filesystem operators have not been benchmarked, so this change deliberately preserves their existing prefetch behavior rather than assuming the HDFS result transfers to them.
This PR remains Draft until the reproducible HDFS measurements are added. The benchmark record should include the same dataset/query for both variants, file count, representative footer-metadata sizes, repeated wall-clock results, and bytes-read or request counts when available; #687 tracks that evidence.
Brief change log
FileRead::supports_cheap_range_readscapability with a conservativefalsedefault.OffsetIndexsolely because an external row selection is present but empty.FileReadcapability-propagation tests.Tests
cargo fmt --all -- --checkcargo test --locked -p paimon --lib arrow::format::parquet::tests(49 passed)cargo test --locked -p paimon --lib scheme_tests --features storage-all(10 passed)cargo test --locked -p paimon --lib custom_fs_operator --features storage-all(3 passed)cargo clippy --locked --all-targets --workspace --features fulltext,vortex -- -D warningsgit diff --checkAPI and Format
Adds a defaulted
FileRead::supports_cheap_range_readsmethod. Existing implementations do not need to implement the new method; they receive the conservativefalsebehavior. No storage-format changes.Documentation
No user-facing documentation changes required. Benchmark evidence is tracked in #687 before the PR is marked ready.