Skip to content

fix: Make conversion from FileDecryptionProperties to ConfigFileDecryptionProperties fallible#21603

Open
adamreeve wants to merge 5 commits intoapache:mainfrom
adamreeve:fallible-decrypt-config-convert
Open

fix: Make conversion from FileDecryptionProperties to ConfigFileDecryptionProperties fallible#21603
adamreeve wants to merge 5 commits intoapache:mainfrom
adamreeve:fallible-decrypt-config-convert

Conversation

@adamreeve
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Fail quickly with a helpful error if we're unable to represent a FileDecryptionProperties instance as ConfigFileDecryptionProperties

What changes are included in this PR?

  • Change the implementation of From<&Arc<FileDecryptionProperties>> for ConfigFileDecryptionProperties to TryFrom.
  • Fail the conversion if we can't get the footer key from the FileDecryptionProperties with empty metadata

Are these changes tested?

Yes I've added a new unit test.

I also tested this with a branch of delta-rs that uses Datafusion with Parquet encryption, and this required only minor changes to tests and examples: corwinjoy/delta-rs@file_format_options_squashed...adamreeve:delta-rs:test-datafusion-change

Are there any user-facing changes?

Yes, this is a breaking API change.

@github-actions github-actions bot added core Core DataFusion crate common Related to common crate labels Apr 14, 2026
@adamreeve adamreeve force-pushed the fallible-decrypt-config-convert branch from 8cc9c06 to 6d380a1 Compare April 14, 2026 04:32
Comment thread datafusion/common/src/config.rs
Comment thread datafusion/common/src/config.rs
@adamreeve adamreeve force-pushed the fallible-decrypt-config-convert branch from dc8ad1a to 704d0f1 Compare April 15, 2026 00:17
@adamreeve adamreeve requested a review from kumarUjjawal April 15, 2026 01:31
Comment thread docs/source/library-user-guide/upgrading/54.0.0.md
Copy link
Copy Markdown
Contributor

@kumarUjjawal kumarUjjawal left a comment

Choose a reason for hiding this comment

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

LGTM, let's wait for someone else to have another look.

@adamreeve
Copy link
Copy Markdown
Contributor Author

Thanks for the review @kumarUjjawal!

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 documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conversion from FileDecryptionProperties to ConfigFileDecryptionProperties should be fallible

2 participants