Repository navigation
fix(writer): keep full statistics in position delete files - #3590
Draft
JeonDaehong wants to merge 1 commit into
Draft
JeonDaehong wants to merge 1 commit into
JeonDaehong wants to merge 1 commit into
Conversation
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?
What changes are included in this PR?
parquet-rs truncates footer statistics to 64 bytes by default, so a position delete file whose data file path is longer than that gets no
file_pathbounds. Readers (referenced_data_filein the delete file index, and Java'sContentFileUtil.referencedDataFile) then can't tell it covers a single data file and apply it to every data file in the partition.ParquetWriterBuilder::buildnow turns statistics truncation off when the schema has the reservedfile_pathfield, like Java'sMetricsConfig.forPositionDelete. Other files keep the configured truncation. #3537 doesn't cover this, since truncated bounds are still not equal.Opening as a draft for now because of the open PR limit. I'll mark it ready once one of mine is merged.
Are these changes tested?
Yes.
test_position_delete_writer_keeps_long_file_path_boundswrites 40, 70 and 200 byte paths (and 200 with an explicit truncate length of 16) and checks both bounds equal the path. It fails without the fix.test_statistics_truncation_kept_off_for_position_deleteschecks a data file schema keeps its truncate length. Clippy, fmt, docs, msrv and the full nextest run are clean.AI Disclosure
I used Claude Code to write the change and run the tests on Linux. I reviewed it before opening the PR.