Skip to content

Minor: Reduce more #cfg(feature = "parquet") in tests - #7934

Closed
alamb wants to merge 7 commits into
apache:mainfrom
alamb:alamb/less_cfg3
Closed

Minor: Reduce more #cfg(feature = "parquet") in tests#7934
alamb wants to merge 7 commits into
apache:mainfrom
alamb:alamb/less_cfg3

Conversation

@alamb

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Follow on to #7745

Rationale for this change

#7745 adds a new parquet feature flag. However, it did by adding a lot of #[cfg] over the codebase.

I believe it is important to keep the codebase as easy to work with as possible, to keep the barrier to new contributors down and encourage additional contributions. Having many #[cfg] in various parts of the code means that even people working on things not related to parquet have to worry about those cfgs.

What changes are included in this PR?

  1. Removes most of the #cfg and instead isolates the parquet specific code to their own modules, with stub implementations when the feature is not enabled.

Are these changes tested?

Existing tests

Are there any user-facing changes?

No

@github-actionsgithub-actionsBot added the core Core DataFusion crate label Oct 26, 2023
@alambalamb changed the title Minor: reduce some #cfg(feature = "parquet")Reduce more #cfg(feature = "parquet")Oct 26, 2023
@alambalamb changed the title Reduce more #cfg(feature = "parquet")Minor: Reduce more #cfg(feature = "parquet") in tetsOct 26, 2023
@alambalamb changed the title Minor: Reduce more #cfg(feature = "parquet") in tetsMinor: Reduce more #cfg(feature = "parquet") in testsOct 26, 2023
@alamb
alamb marked this pull request as ready for review October 26, 2023 13:56

@Weijun-HWeijun-H left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It failed when running cargo test --package datafusion-common

Comment threaddatafusion/core/src/datasource/file_format/parquet/parquet_stub.rs Outdated
@alamb
alamb requested a review from andygroveNovember 8, 2023 19:10
@alamb

alamb commented Nov 8, 2023

Copy link
Copy Markdown
ContributorAuthor

@andygrove I wonder if you have time to review this PR?

@alamb

Copy link
Copy Markdown
ContributorAuthor

This PR is slowly bitrotting, Given no one seems to care, I'll close this one

@alambalamb closed this Nov 28, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coreCore DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@alamb@msirek@Weijun-H