Skip to content

feat: Dynamic Parquet encryption and decryption properties #16779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

adamreeve
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

See #16778. This allows per-file encryption key generation and for keys to be retrieved based on encryption metadata stored in the Parquet files, rather than readers needing to know AES keys upfront.

What changes are included in this PR?

  • Adds a new EncryptionFactory trait for types that generate file encryption and decryption properties. This is loosely based on the approach used by Spark (see this comment for details).
  • Allows registering EncryptionFactory instances in the RuntimeEnv, similar to how ObjectStores can be registered.
  • Updates the crypto configuration field in TableParquetOptions to allow setting an encryption factory id, and opaque configuration options required by the encryption factory.
  • Updates Parquet encryption and decryption code to use a registered EncryptionFactory where necessary.

Are these changes tested?

Yes, new unit tests and an example have been added.

Are there any user-facing changes?

Yes, this is a new user-facing feature.

@github-actions github-actions bot added core Core DataFusion crate common Related to common crate execution Related to the execution crate datasource Changes to the datasource crate labels Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Related to common crate core Core DataFusion crate datasource Changes to the datasource crate execution Related to the execution crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

More flexible Parquet encryption configuration
1 participant