Skip to content

Using magic enum in types_test to improve ParquetCipher testing - #228

Merged
sofia-tekdatum merged 2 commits into
mainfrom
improve_types_test
Jan 7, 2026
Merged

Using magic enum in types_test to improve ParquetCipher testing#228
sofia-tekdatum merged 2 commits into
mainfrom
improve_types_test

Conversation

@sofia-tekdatum

Copy link
Copy Markdown

Using magic_enum library to improve the supported ciphers test.

@sofia-tekdatum sofia-tekdatum linked an issue Jan 6, 2026 that may be closed by this pull request
@github-actions

github-actions Bot commented Jan 6, 2026

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

Choose a reason for hiding this comment

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

Thanks for this. Overall LGTM, but left a comment.

No need for a new PR if/when addressed.

Comment thread cpp/src/parquet/types_test.cc Outdated
Comment on lines +220 to +222
for (auto cipher : magic_enum::enum_values<ParquetCipher::type>()) {
ASSERT_TRUE(IsParquetCipherSupported(cipher));
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

instead of doing this, I'd keep the original check (asserting for each individual known Cipher). This way we guarantee that test will break is a cipher is accidentally replaced by another.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done, thanks!

@sofia-tekdatum
sofia-tekdatum merged commit 36c80e9 into main Jan 7, 2026
22 of 91 checks passed
@sofia-tekdatum
sofia-tekdatum deleted the improve_types_test branch January 7, 2026 15:17
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.

Parquet > Improve types_test.cc for completeness

2 participants