Skip to content
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

Fix test feature selection so all feature combinations work as expected #6626

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

itsjunetime
Copy link
Contributor

Which issue does this PR close?

Some combinations of features cause compilation failures or test failures where not necessary. For example, in the parquet/src/file/metadata/reader.rs file, the MetadataFetch trait is only imported when feature = "async", but that trait exists under a module that's marked feature = "arrow", so we need to enable both those features to get it to work.

Rationale for this change

There's nothing stopping people from using any combination of features from this crate, so we should make sure they're all supported

What changes are included in this PR?

This just adds extra #[cfg()] attributes where necessary to fix compilation and test failures.

Are there any user-facing changes?

No. It looks, on the surface, like we could be breaking the parquet crate for people who have the async flag enabled with the arrow flag disabled, but this crate doesn't compile in its current form for that combination, so this won't actually adversely affect anyone.

@github-actions github-actions bot added the parquet Changes to the parquet crate label Oct 24, 2024
Copy link
Contributor

@etseidl etseidl 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 to me. Doesn't have to be this PR, but I get a doc-test failure in parquet/src/arrow/mod.rs line 27 when snap is not enabled.

@@ -31,7 +31,7 @@ use crate::schema::types;
use crate::schema::types::SchemaDescriptor;
use crate::thrift::{TCompactSliceInputProtocol, TSerializable};

#[cfg(feature = "async")]
#[cfg(all(feature = "async", feature = "arrow"))]
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, nice catch! It seems I relied on the default feature set when I added this.

@tustvold tustvold merged commit 9f889aa into apache:master Oct 29, 2024
16 checks passed
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.

3 participants