Skip to content

Support zstd blob decompression in Puffin - #3575

Merged
Fokko merged 2 commits into
apache:mainfrom
ebyhr:ebi/puffin-compression
Jul 18, 2026
Merged

Support zstd blob decompression in Puffin#3575
Fokko merged 2 commits into
apache:mainfrom
ebyhr:ebi/puffin-compression

Conversation

@ebyhr

@ebyhr ebyhr commented Jun 28, 2026

Copy link
Copy Markdown
Member

Rationale for this change

Support zstd blob decompression in Puffin to enhance its specification coverage.

Are these changes tested?

Yes. Copied a Puffin file from https://github.com/apache/iceberg/tree/main/core/src/test/resources/org/apache/iceberg/puffin/v1

Are there any user-facing changes?

No.

@ebyhr
ebyhr marked this pull request as draft June 28, 2026 11:10
Fokko pushed a commit that referenced this pull request Jun 30, 2026
# Rationale for this change

Fix `_payload` storing `puffin[8:]` instead of `puffin` — blob offsets
in the footer are file-relative (from byte 0), not relative to byte 8.
The two bugs cancelled for single-blob files at offset 4; the fix was
only testable once PuffinFile supported multi-blob/compressed files.

Also widen `PuffinBlobMetadata.type` from
`Literal["deletion-vector-v1"]`
to `str` so `PuffinFile` can parse files containing non-DV blobs without
a Pydantic validation error.

## Are these changes tested?

Yes. Copied files from
https://github.com/apache/iceberg/tree/main/core/src/test/resources/org/apache/iceberg/puffin/v1
`sample-metric-data-compressed-zstd.bin` will be added separately in
#3575

## Are there any user-facing changes?

No

<!-- In the case of user-facing changes, please add the changelog label.
-->
@ebyhr
ebyhr force-pushed the ebi/puffin-compression branch from 8c7db31 to 4ab4d3f Compare June 30, 2026 04:18
@ebyhr
ebyhr force-pushed the ebi/puffin-compression branch from 4ab4d3f to e882ba8 Compare June 30, 2026 04:37
@ebyhr
ebyhr marked this pull request as ready for review June 30, 2026 05:10

@Fokko Fokko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @ebyhr for adding this 👍 Left a small nit, but it looks good to me

Comment thread pyiceberg/table/puffin.py Outdated
@ebyhr

ebyhr commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

Thanks for your review! Addressed the comment.

@Fokko
Fokko merged commit fea08ad into apache:main Jul 18, 2026
17 checks passed
@Fokko

Fokko commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Sorry for letting this linger for a while @ebyhr thanks for working on this!

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