Skip to content

feat(python) add standard key metadata python bindings - #3206

Open
xanderbailey wants to merge 3 commits into
apache:mainfrom
xanderbailey:python-encryption-bindings
Open

feat(python) add standard key metadata python bindings#3206
xanderbailey wants to merge 3 commits into
apache:mainfrom
xanderbailey:python-encryption-bindings

Conversation

@xanderbailey

@xanderbailey xanderbailey commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • Closes #.

As discussed in apache/iceberg-python#3948. We think it might be a good idea to push as much of the core logic for encryption in iceberg-python into iceberg-rust. This PR starts with adding encode / decode for standard key metadata. I don't want the iceberg rust side to block progress on the python side but I will track moving things over to the rust implementation as versions of iceberg-rust are published.

What changes are included in this PR?

Registers new encryption python module.

Are these changes tested?

Yes

Upstream Avro follow-up

apache-avro 0.21 and 0.22 can decode missing or truncated union tags as null. This pre-existing decoder issue will be addressed upstream rather than with an Iceberg-specific workaround. Upstream issue: TODO: add the apache/avro-rs issue link once filed.

AI Disclosure

xanderbailey and others added 2 commits September 12, 2026 16:10
Report the received and supported key metadata versions, matching the wording expected by PyIceberg. Add Rust and Python regression coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@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

I pushed a small change to align the error message with python's

I also built the binding and tested locally against pyiceberg, all the existing tests from apache/iceberg-python#3948 passed

@kevinjqliu

Copy link
Copy Markdown
Contributor

lets see if others have any feedback on this PR

@kevinjqliu

Copy link
Copy Markdown
Contributor

apache-avro 0.21 and 0.22 can decode missing or truncated union tags as null. This pre-existing decoder issue will be addressed upstream rather than with an Iceberg-specific workaround. Upstream issue: TODO: add the apache/avro-rs issue link once filed.

BTW this issue was also flagged by my agent and I looked into it. There's already a fix in the main branch: apache/avro-rs#664

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