etseidl opened a new pull request, #12372: URL: https://github.com/apache/arrow-rs/pull/12372
# Which issue does this PR close? - Part of #12325 - Follow-up to the file-read/metadata hardening PR #12369; stacked on its branch until it merges. # Rationale for this change See #12325 for the rationale. This follow-up keeps the serialized-reader changes together and builds on the checked compressed-size helper introduced by the metadata PR. # What changes are included in this PR? - Check synthesized dictionary-page sizes and indexed page row counts, including offset-index range and first-row boundaries. - Make `PageMetadata::try_from` reject missing data-page headers and negative counts. Keep the conversion changes with the serialized peek implementation that propagates those errors. - Make sequential peek skip both the header and body of an `INDEX_PAGE` without swallowing malformed-page errors. - Check V2 level-length addition and the page-body budget used by sequential skip. - Check row-group midpoint arithmetic for range-filtered opens. Internally adapt the existing boolean predicate to a fallible callback while preserving predicate order and short-circuit behavior. Only `parquet/src/file/serialized_reader.rs` and its companion `parquet/src/column/page.rs` are changed relative to the metadata PR. # Are these changes tested? Yes. # Are there any significant user-facing changes? No new public API or changed public signature. Selected malformed-page inputs and overflowing range-filter arithmetic now return errors. `ReadGroupPredicate` remains a boolean callback; `ReadOptionsBuilder::with_predicate` and `with_range` retain their signatures, and `with_range` retains its documented invalid-range panic precondition. File-dependent range errors propagate when constructing the reader. # AI usage disclosure AI tools assisted with the source audit, implementation, private validation harnesses, review, split, and this draft. The author is responsible for reviewing and supporting the submitted changes and evidence. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
