Repository navigation
Conversation
Contributor
Author
|
cc @Rich-T-kid. First parquet audit...found 6 potential issues, and closes one existing. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
See #12325 for the rationale.
This is the file-read and metadata portion of the Parquet hardening audit. Separate serialized page traversal and range-filter arithmetic changes were split out due to size and will be submitted as a follow-up.
What changes are included in this PR?
Bytesread offsets and ranges before conversion or slicing. Bound largerFileread reservations by the available file suffix, without an additional file-length query for requests of at most 64 KiB.nan_countslists whose lengths differ from the page count.The public column metadata builder,
byte_range()getter, and row-groupcompressed_size()getter are unchanged. The #6255 repair is at file-metadata admission, not a new invariant for caller-built metadata. File reservation checks are not a total memory limit.Are these changes tested?
The PR includes the existing audit regression tests for oversized
File/Bytesranges. Existing metadata, writer, column-index, and encryption tests exercise valid paths. On this standalone split snapshot, formatting, spelling, scoped all-feature Clippy, and the all-feature Parquet suite pass: 2,293 passed, 0 failed, 8 ignored.Private debug/release probes were rerun against this split for ordinary negative column ranges and 120 encrypted cases per profile (27 accepted, 93 rejected), including missing-key retention and decrypted replacements. Earlier private probes cover footer and aggregate arithmetic. The proposed shared #6255 fixture is deferred pending maintainer discussion; no new fixture, submodule update, or additional permanent test is included.
Prior repeated paired benchmarks exercised these file-read and metadata changes as part of the combined patch, using a pinned unchanged baseline and matching toolchain/features/harness. Some cases measured slower amid substantial host noise. The standalone split has not been rebenchmarked; no equivalence or speed-improvement claim is made. No benchmark scaffolding is included.
Are there any significant user-facing changes?
No new public API or changed public signature. Selected invalid read ranges and malformed metadata now return errors instead of panicking or wrapping. Valid-file and encrypted missing-key behavior are preserved.
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.