Skip to content

fix(writer): keep full statistics in position delete files - #3590

Draft
JeonDaehong wants to merge 1 commit into
apache:mainfrom
JeonDaehong:fix-pos-del-path-bounds
Draft

JeonDaehong wants to merge 1 commit into
apache:mainfrom
JeonDaehong:fix-pos-del-path-bounds

Conversation

@JeonDaehong

Copy link
Copy Markdown
Contributor

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_path bounds. Readers (referenced_data_file in the delete file index, and Java's ContentFileUtil.referencedDataFile) then can't tell it covers a single data file and apply it to every data file in the partition.

ParquetWriterBuilder::build now turns statistics truncation off when the schema has the reserved file_path field, like Java's MetricsConfig.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_bounds writes 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_deletes checks 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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parquet writer drops bounds for string/binary values longer than 64 bytes

1 participant