L. C. Hsieh created SPARK-59832:
-----------------------------------

             Summary: Fail on truncated input in the vectorized RLE reader
                 Key: SPARK-59832
                 URL: https://issues.apache.org/jira/browse/SPARK-59832
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 5.0.0
            Reporter: L. C. Hsieh


Follow-up of SPARK-59812. The vectorized RLE/bit-packing hybrid reader 
(VectorizedRleValuesReader), used for definition/repetition levels, dictionary 
ids and booleans, does not fail when the encoded data ends before the requested 
values are read:

* When readNextGroup() returns false at the end of the stream, the batch read 
and skip loops silently break, so dictionary ids and levels are only partially 
read or skipped.
* readBooleans ignores the return value of readNextGroup(). At the end of the 
stream currentCount stays 0, so the loop makes no progress and never terminates.
* readInteger() also ignores the return value of readNextGroup().
* The length passed to sliceStream(length) for levels, and the PACKED run size 
`numGroups * bitWidth`, are read from the file without validation.

The reader should fail with a ParquetDecodingException in these cases, like the 
other vectorized readers now do.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to