Skip to content

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Oct 15, 2025

Which issue does this PR close?

Rationale for this change

While testing arrow 57 with DataFusion, I found there was a disconnect
in the builders that the FileDecryptionProperties builder builds Arc and the FileEncryptionProperties builder builds the struct directly

Let's make the APIs consistent

This also allows encryption properties to be shared and cloned cheaply (I am not sure how often this is needed, but it seems like a reasonable thing to do)

What changes are included in this PR?

See above

Are these changes tested?

Yes, by existing tests

Are there any user-facing changes?

This is an API change, started in #8470

/// Build the encryption properties
pub fn build(self) -> Result<FileEncryptionProperties> {
Ok(FileEncryptionProperties {
pub fn build(self) -> Result<Arc<FileEncryptionProperties>> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the main API change, and the rest of the changes mostly follow from here

path: &str,
decryption_properties: Arc<FileDecryptionProperties>,
encryption_properties: FileEncryptionProperties,
encryption_properties: Arc<FileEncryptionProperties>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is now nicely symmetric which I think is a good sign

@alamb alamb marked this pull request as ready for review October 15, 2025 14:54
@mbrobbel mbrobbel added this to the 57.0.0 milestone Oct 15, 2025
@alamb
Copy link
Contributor Author

alamb commented Oct 15, 2025

You are a reviewing machine @mbrobbel -- thank you 🙏

@alamb
Copy link
Contributor Author

alamb commented Oct 15, 2025

FYI @adamreeve and @rok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-change Changes to the arrow API parquet Changes to the parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants