Skip to content

fix(parquet/encoding): respect declared RLE payload lengths#1015

Open
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/parquet-rle-payload-length
Open

fix(parquet/encoding): respect declared RLE payload lengths#1015
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/parquet-rle-payload-length

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Rationale for this change

RLE level and boolean decoders validate their declared byte length but then give the decoder every remaining byte in the page. A short declared payload can therefore consume bytes belonging to the next encoded section instead of reporting a truncated run.

What changes are included in this PR?

  • Limit Data Page V1 level decoding to its four-byte-length-prefixed payload.
  • Limit Data Page V2 level decoding to its explicit byte count.
  • Apply the same boundary to RLE boolean values.
  • Validate the Data Page V2 length against the supplied data.

Are these changes tested?

Yes. Focused tests verify that bytes after each declared RLE interval are not consumed.

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 25, 2026 16:09
@fallintoplace
fallintoplace force-pushed the fix/parquet-rle-payload-length branch from 9721f65 to 221c24c Compare July 25, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant