Skip to content

Adding wiring for ExternalEncryption and ExternalDecryption objects i… - #255

Merged
sofia-tekdatum merged 4 commits into
mainfrom
change_parquet_fragment_scan
Mar 17, 2026
Merged

Adding wiring for ExternalEncryption and ExternalDecryption objects i…#255
sofia-tekdatum merged 4 commits into
mainfrom
change_parquet_fragment_scan

Conversation

@sofia-tekdatum

Copy link
Copy Markdown
Collaborator

Add wiring for ExternalEncryptionConfig and ExternalDecryptionConfig in ParquetEncryptionConfig and ParquetDecryptionConfig.

Also add support for ExternalFileDecryptionProperties in ParquetFragmentScanOptions.

These were entry points that were missing. I have checked and after any of these are created in C++, the code creates FileReader and FileWriter objects, which already know how to deal with External encryption and decryption cases.

Adding tests to cover the new cases.

…n ParquetEncryptionConfig, ParquetDecryptionConfig, ParquetFragmentScanOptions, and ParquetFileWriteOptions
@github-actions

Copy link
Copy Markdown

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@argmarco-tkd argmarco-tkd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank for you this. LGTM - but left a couple of comments (main one around testing coverage). No need for a new PR if/when addressed.

Comment thread cpp/src/arrow/dataset/file_parquet.cc
Comment thread cpp/src/arrow/dataset/file_parquet.cc
Comment thread cpp/src/arrow/dataset/parquet_encryption_config.h
Comment thread python/pyarrow/tests/test_dataset_encryption.py
};

struct ExternalConfigTestParam {
bool uniform_encryption; // false is using per-column keys

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why not call this bool use_per_column_encryption?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed this.


struct ExternalConfigTestParam {
bool uniform_encryption; // false is using per-column keys
bool concurrently;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what's this for? (let's add a comment)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Restructured the test and removed this.

}
};

struct ExternalConfigTestParam {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

High level comment for this file - there is a lot going on, but mostly it seems that we're just testing that the configuration(s) passed in are correct. Maybe I missed something, but I don't think I got to see a test where we actually exercise external encryption (e.g. external encrypt/decrypt roundtrip).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It was mostly a plumbing test only. Added explicit testing of the external encryption in a column and aes encryption in another column.

@argmarco-tkd argmarco-tkd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for the changes. LGTM. Ship it!

Comment thread cpp/src/arrow/dataset/file_parquet.cc
@sofia-tekdatum
sofia-tekdatum merged commit 5cead8f into main Mar 17, 2026
50 of 112 checks passed
@sofia-tekdatum
sofia-tekdatum deleted the change_parquet_fragment_scan branch March 17, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants