Uh oh!
There was an error while loading. Please reload this page.
Add Parquet Modular encryption support (write) - #7111
Conversation
8e6a4be to
d1ccf75Comparef6d1155 to
05d4d60Comparedad9642 to
5d52ef7Compare36d7c70 to
bc75007Compare24e70d9 to
cc58a3aCompare65fca4b to
44559b0Comparec5a692c to
87224eaComparecab7dd4 to
de5feefCompareadamreeve
commented
Mar 27, 2025
Thanks, this example helped. I took another pass at refactoring
The one thing that comes to mind is whether we want to change |
Uh oh!
There was an error while loading. Please reload this page.
corwinjoy
commented
Mar 27, 2025
@alamb wrote:
One minor API change that I would like to have considered is this related PR that I feel makes decryption usage better. At the suggestion of @adamreeve I have posted this on its own PR. |
alamb
commented
Mar 27, 2025
We would have to try it I suspect to test |
alamb
commented
Mar 27, 2025
How is this PR doing, btw? Is it ready for another review? |
adamreeve
commented
Mar 27, 2025
Yes I think this is ready for review. There are a couple of comments I'd like some input on (https://github.com/apache/arrow-rs/pull/7111/files#r2015196618 and https://github.com/apache/arrow-rs/pull/7111/files#r2009421835) but otherwise it's looking good to me. |
alamb
left a comment
There was a problem hiding this comment.
Thank you @rok@adamreeve and @corwinjoy 👏
I think this is looking really nice. I had some style comments but I don't think anything is required. I am not an expert in this area of the parquet spec, but I found the code clear, clean, and well commented and tested 🥇 🏆
I do also think it would be great to add some examples (as a follow on PR) that shows how to write an arrow record batch with encryption to a parquet file
The only thing I want to do before approving this is to run some benchmark tests (to make sure it doesn't accidentally slow down writing without encryption). I have started this and will report back
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
alamb
commented
Mar 28, 2025
I ran the performance benchmarks and I do not see any changes for parquet writing with this PR (though the numbers do vary somewhat). Nice work. Details below DetailsSecond run |
Your latest comments should all be addressed now thanks @alamb. I've also just added one extra test to cover being able to use unencrypted row group metadata when writing a file. I'll follow up with a PR soon to add some examples. |
alamb
commented
Mar 31, 2025
Thanks @adamreeve@corwinjoy and @rok ! I'll plan to merge this tomorrow This PR appeared to have a conflict so I took the liberty of merging up from main |
alamb
commented
Apr 1, 2025
Merged to resolve another conflict 🙄 |
alamb
commented
Apr 1, 2025
Thanks again @rok@etseidl@adamreeve and @corwinjoy 🦾 🚀 |
alamb
commented
Apr 1, 2025
I also made a small PR to update the parquet status page (when this is released): |
alamb
commented
Apr 1, 2025
Follow on PR (for full support) is:
I will mark that ready for review when we have released the next version of arrow-rs |

Which issue does this PR close?
Closes#7327
This PR is based on branch and an internal patch and /pull/6637 and aims to provide basic modular encryption support.
Rationale for this change
See #3511 and #7278. This allows users to write Parquet files with modular encryption.
What changes are included in this PR?
encryption::encryptmodule, containing types for configuring encryption, and types that implement encryption of metadata and page data.with_file_encryption_propertiesmethod toWriterPropertiesBuilderto enable encryption.encryptiontest library, moves existing tests for reading encrypted Parquet files to this and adds new tests for writing encrypted files.Are there any user-facing changes?
Yes, this adds the ability to specify encryption properties when writing Parquet files.
Several new types and methods are added when the
encryptionfeature is enabled but there should be no breaking changes.