Skip to content

Support writing encrypted Parquet files with plaintext footers #7439

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 23 commits into
base: main
Choose a base branch
from

Conversation

rok
Copy link
Member

@rok rok commented Apr 23, 2025

Closes #7320.

Rationale for this change

The Parquet format allows encrypting some or all column data while keeping footers in plaintext for compatibility with readers that don't support encryption. See spec.

Arrow-rs already supports reading plaintext footers and writing encrypted parquet files and should also support writing parquet files with plaintext footers.

What changes are included in this PR?

Are there any user-facing changes?

This now enables writing plaintext footers, while in current state attempting to write a plaintext footer would throw an error.

@github-actions github-actions bot added the parquet Changes to the parquet crate label Apr 23, 2025
@rok rok force-pushed the gh-7320-write-encrypted-with-plaintext-footer branch from 43b1242 to 8491010 Compare April 28, 2025 20:28
@rok rok force-pushed the gh-7320-write-encrypted-with-plaintext-footer branch 2 times, most recently from 66fa295 to 6432214 Compare May 1, 2025 19:25
@rok rok requested a review from adamreeve May 1, 2025 20:48
@rok rok force-pushed the gh-7320-write-encrypted-with-plaintext-footer branch 6 times, most recently from 3339491 to 0261b29 Compare May 5, 2025 18:57
@rok rok force-pushed the gh-7320-write-encrypted-with-plaintext-footer branch from 0261b29 to 77707b2 Compare May 5, 2025 22:28
@rok rok force-pushed the gh-7320-write-encrypted-with-plaintext-footer branch from 77707b2 to 631839c Compare May 5, 2025 22:31
@rok rok force-pushed the gh-7320-write-encrypted-with-plaintext-footer branch from 631839c to 8b1aace Compare May 6, 2025 10:45
@rok rok force-pushed the gh-7320-write-encrypted-with-plaintext-footer branch 3 times, most recently from 45290c0 to 5a33909 Compare May 6, 2025 13:28
@rok rok force-pushed the gh-7320-write-encrypted-with-plaintext-footer branch from 5a33909 to 1ab252b Compare May 6, 2025 13:32
@rok rok marked this pull request as ready for review May 7, 2025 12:02
@rok rok requested a review from alamb May 7, 2025 12:05
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @rok and @adamreeve -- this also looks great to me

let column_2_key = "1234567890123451".as_bytes();

let decryption_properties = FileDecryptionProperties::builder(footer_key.to_vec())
.disable_footer_signature_verification()
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support writing encrypted Parquet files with plaintext footers
3 participants