Arrow: Fix vectorized read of all-null DELTA-encoded Parquet pages - #17017
Merged
Conversation
raunaqmorarka
force-pushed
the
fix-delta-all-null-page
branch
from
June 30, 2026 06:02
0161b1e to
ae79239
Compare
|
Eagerly looking forward to this getting merged :) |
wombatu-kun
reviewed
Jun 30, 2026
raunaqmorarka
force-pushed
the
fix-delta-all-null-page
branch
from
June 30, 2026 09:28
ae79239 to
b330599
Compare
nssalian
suggested changes
Jun 30, 2026
raunaqmorarka
force-pushed
the
fix-delta-all-null-page
branch
from
June 30, 2026 18:30
b330599 to
8b48e94
Compare
nssalian
requested review from
huaxingao and
singhpk234
and removed request for
wombatu-kun
June 30, 2026 19:56
ebyhr
reviewed
Jul 7, 2026
| currentRowId += loadedRows; | ||
| remaining -= loadedRows; | ||
| } | ||
| valuesRead = total - remaining; |
An all-null page decodes to a length stream with totalValueCount 0, so readValues wrote firstValue into a zero-length array.
raunaqmorarka
force-pushed
the
fix-delta-all-null-page
branch
from
July 7, 2026 06:28
8b48e94 to
143b9ac
Compare
|
i am also facing the same issue, it would be great if someone can merge this soon. |
findepi
approved these changes
Aug 6, 2026
Contributor
Author
|
@nssalian do you mind re-assessing your request changes here ? |
nssalian
approved these changes
Aug 6, 2026
nssalian
left a comment
Collaborator
There was a problem hiding this comment.
lgtm. Will defer to @huaxingao for the final review + merge
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.
Problem
Vectorized reads of Parquet V2 files crash with
ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0when a string/binary column page usingDELTA_BYTE_ARRAY/DELTA_LENGTH_BYTE_ARRAYhas zero non-null values (an all-null page).Cause
An all-null page decodes to a length stream with
totalValueCount == 0.readIntegers(0, …)allocates a zero-length array, butreadValuesalways wrotefirstValueintoresult[0].Fix
Skip the first-value write when
total == 0.Test
Added a Spark vectorized-read test with all-null string and binary columns in a V2, dictionary-disabled file. It reproduces the crash before the fix and passes after.