Fix(parquet): Fix spurious refill failure for multi-page DATA_PAGE_V2 chunks - #2341
Open
r7raul1984 wants to merge 1 commit into
Open
Fix(parquet): Fix spurious refill failure for multi-page DATA_PAGE_V2 chunks#2341r7raul1984 wants to merge 1 commit into
r7raul1984 wants to merge 1 commit into
Conversation
r7raul1984
force-pushed
the
fixv2
branch
2 times, most recently
from
August 2, 2026 06:08
0331a7e to
db0fd1e
Compare
… chunks Signed-off-by: jijtang <8199300+r7raul1984@users.noreply.github.com>
Author
|
@majetideepak hi, could u kindly take a look? |
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.
Summary
PageReader::prepareDataPageV2'srow == kRepDefOnlybranch calledskipBytes()on a page's compressed bytes that had already been fullyconsumed a few lines above via
readBytes(). When a column chunk holdsmore than one
DATA_PAGE_V2page and the first page's compressed sizeexceeds the bytes remaining in the chunk after it, that redundant skip
drained the stream past the true end of the already-fetched buffer.
PageReader's logical byte offset (pageStart_) still believed moredata existed, so
preloadRepDefs()issued one extrareadPageHeader()call, which failed with
Thrift deserialize error: Empty buffer returned when refillingonce the stream had nothing left to give.This surfaced as a deterministic (non-flaky) failure when exploding a
nested list/array column whose chunk spans multiple data pages — e.g.
Spark's
ParquetIOSuitetest"explode nested lists crossing a rowgroup boundary"againstpacked-list-vectorized.parquet.prepareDataPageV1does not have this bug — it has no analogous extraskip after consuming the page via
readBytes().The fix removes the redundant
skipBytes()call;readBytes()alreadyadvances past the whole page.