Parquet: Add opt-in uncompressed row group size tracking#16327
Merged
Conversation
3 tasks
Collaborator
Author
|
CC: @pvary @steveloughran @huaxingao @aihuaxu PTAL |
steveloughran
left a comment
Contributor
There was a problem hiding this comment.
LGTM, good test coverage.
Collaborator
Author
|
@Fokko PTAL when you get a chance |
Fokko
reviewed
May 26, 2026
steveloughran
left a comment
Contributor
There was a problem hiding this comment.
production code looks valid, though I'd have factored out the common code myself.
regarding the tests, is it possible to show this working for smaller datasets for a faster test run?
steveloughran
approved these changes
May 28, 2026
steveloughran
left a comment
Contributor
There was a problem hiding this comment.
I like this...i can really understand the evaluateRowGroupSize() process on both paths now.
No other suggestions from me
huaxingao
reviewed
May 29, 2026
huaxingao
reviewed
Jun 5, 2026
huaxingao
reviewed
Jun 5, 2026
huaxingao
reviewed
Jun 5, 2026
Fokko
approved these changes
Jun 6, 2026
huaxingao
reviewed
Jun 7, 2026
Contributor
|
Thanks @nssalian for the PR! Thanks @steveloughran @Fokko for the review! |
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.
Closes: #16325
Rationale for this Change
Adds
write.parquet.row-group-size-check-uncompressed(default false) to accurately enforcewrite.parquet.row-group-size-byteswhen using compressing codecs (GZIP, ZSTD, etc.).ParquetWriter.checkSize()useswriteStore.getBufferedSize()which reports compressed bytes for flushed pages. With effective compression, the writer never sees the target exceeded because it's comparing compressed data against an uncompressed limit. Row groups grow unbounded.What changes are included in this PR?
When
write.parquet.row-group-size-check-uncompressed=true:getBufferedSize()before and aftermodel.write()per record. Between these points, data is in uncompressed column buffers (no page flush occurs duringmodel.write()). The delta is the exact uncompressed record size.rowGroupUncompressedSize. Flushes when it hits the target.Disabled by default.
When enabled
getBufferedSize()calls per record. Each call iterates column writers adding field reads. It's the same pattern parquet-mr uses inColumnWriteStoreBase.sizeCheck(). Kept it optional so as to not cause an immediate change to the default behavior.Are these changes tested?
Are there any user-facing changes?
Yes. New configuration but set to
falseby default.