Skip to content

feat(encryption): [12/N] Read encrypted deletion vectors - #4326

Merged
kevinjqliu merged 1 commit into
apache:mainfrom
xanderbailey:xb/encryption-read-deletion-vectors
Nov 10, 2026
Merged

kevinjqliu merged 1 commit into
apache:mainfrom
xanderbailey:xb/encryption-read-deletion-vectors

Conversation

@xanderbailey

@xanderbailey xanderbailey commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Working towards #3222

Rationale for this change

We need to be able to read deletion vectors stored in encrypted Puffin files.

Are these changes tested?

Yes. A Puffin file with one deletion vector, encrypted by iceberg-rust, is checked in under tests/table/encryption.

Are there any user-facing changes?

No. Nothing changes for unencrypted tables.

A Puffin delete file's key_metadata holds the plaintext key metadata of its
AGS1 stream, so deletion vector reads decrypt with it when it is set, as
iceberg-rust does. Content offsets refer to the decrypted file.
@xanderbailey
xanderbailey marked this pull request as ready for review November 10, 2026 13:43

@kevinjqliu kevinjqliu 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.

LGTM!

Comment on lines +160 to +162
if dv.key_metadata is not None:
return EncryptedInputFile(input_file, StandardKeyMetadata.from_bytes(dv.key_metadata))
return input_file

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.

nit: we might want to refactor this (later) since this repeats the same logic as ManifestFile.fetch_manifest_entry()

We could potentially share a helper in pyiceberg/encryption/io.py that accepts an InputFile and optional key-metadata bytes, then reuse it in both places. Non-blocking.

@kevinjqliu
kevinjqliu added this pull request to the merge queue Nov 10, 2026
@kevinjqliu

Copy link
Copy Markdown
Contributor

thanks @xanderbailey

Merged via the queue into apache:main with commit 9cbf09a Nov 10, 2026
20 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