Skip to content

fix(parquet/compress): honor LZ4 raw destination contract - #1147

Merged
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:fix/lz4-raw-dst-contract
Aug 11, 2026
Merged

fix(parquet/compress): honor LZ4 raw destination contract#1147
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:fix/lz4-raw-dst-contract

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What

The LZ4 raw codec passed the provided capacity straight to CompressBlock. Nil or undersized destinations could panic instead of allocating as promised by Codec.Encode. This allocates the compression bound when the destination capacity is insufficient.

Test

  • go test ./parquet/compress -count=1

@fallintoplace
fallintoplace marked this pull request as ready for review August 8, 2026 15:52

@zeroshade zeroshade left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LZ4 raw codec now honors the documented destination-buffer contract while preserving caller-provided storage when capacity is sufficient. The regression and broader Parquet tests cover the allocation, round-trip, and reuse behavior. Looks good.

@zeroshade
zeroshade merged commit cca3d5b into apache:main Aug 11, 2026
23 checks passed
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.

2 participants