Skip to content

Move Parquet encryption tests into the arrow_reader integration tests #7279

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

Merged
merged 4 commits into from
Mar 13, 2025

Conversation

adamreeve
Copy link
Contributor

@adamreeve adamreeve commented Mar 13, 2025

Rationale for this change

See #6637 (comment)

This ensures that the tests are built with the same visibility restrictions as user programs, and reduces the need for #[cfg(feature = "encryption")] on all tests.

What changes are included in this PR?

  • Moves encryption related tests into parquet/tests/arrow_reader
  • Re-uses the verify_encryption_test_data function for the test that uses object_store.

Are there any user-facing changes?

No

@github-actions github-actions bot added the parquet Changes to the parquet crate label Mar 13, 2025
@adamreeve adamreeve force-pushed the encryption-test-tidy branch from 2a0c109 to 9ac075b Compare March 13, 2025 01:39
Copy link
Member

@rok rok left a comment

Choose a reason for hiding this comment

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

Looks good!

mod encryption;
#[cfg(all(feature = "encryption", feature = "async"))]
mod encryption_async;
mod encryption_common;
Copy link
Member

Choose a reason for hiding this comment

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

Nit: how about read_encrypted_with_plaintext_footer or encryption_agnostic? encryption_common slightly implies some sort of shared utility and made me wonder why it's not behind #[cfg(feature = "encryption")]. Not a big deal, feel free to ignore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah encryption_agnostic sounds better, I couldn't think of a good name for this.

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 @adamreeve -- this is great (and thank you @rok for the ping)

I also double checked that the tests are run as part of CI: https://github.com/apache/arrow-rs/actions/runs/13826035766/job/38681041589?pr=7279

Screenshot 2025-03-13 at 7 38 37 AM

assert_eq!(file_metadata.num_rows(), 50);
assert_eq!(file_metadata.schema_descr().num_columns(), 8);

metadata.metadata.row_groups().iter().for_each(|rg| {
metadata.row_groups().iter().for_each(|rg| {
Copy link
Contributor

Choose a reason for hiding this comment

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

that is a nice change

@alamb
Copy link
Contributor

alamb commented Mar 13, 2025

Since these are tests only changes I am going to merge it in to avoid conflicts and get us ready for the next round

@alamb alamb merged commit a8f0957 into apache:main Mar 13, 2025
17 checks passed
@alamb
Copy link
Contributor

alamb commented Mar 13, 2025

Thanks agian!

@adamreeve adamreeve deleted the encryption-test-tidy branch March 13, 2025 20:05
PinkCrow007 pushed a commit to PinkCrow007/arrow-rs that referenced this pull request Mar 20, 2025
…apache#7279)

* Move encryption tests to arrow_reader tests

* Move object store tests and simplify verification function

* Test reading plaintext footer files with encryption both disabled and enabled

* Rename encryption_common module to encryption_agnostic
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.

Consolidate encryption parquet tests
3 participants