Arrow: Fix vectorized read of all-null DELTA-encoded Parquet pages#17017
Open
raunaqmorarka wants to merge 1 commit into
Open
Arrow: Fix vectorized read of all-null DELTA-encoded Parquet pages#17017raunaqmorarka wants to merge 1 commit into
raunaqmorarka wants to merge 1 commit into
Conversation
0161b1e to
ae79239
Compare
|
Eagerly looking forward to this getting merged :) |
wombatu-kun
reviewed
Jun 30, 2026
An all-null page decodes to a length stream with totalValueCount 0, so readValues wrote firstValue into a zero-length array.
ae79239 to
b330599
Compare
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.