Skip to content

Make it possible to compile datafusion-common without default features - #7625

Merged
alamb merged 4 commits into
apache:mainfrom
jonmmease:jonmmease/expr_default_features
Sep 22, 2023
Merged

Make it possible to compile datafusion-common without default features#7625
alamb merged 4 commits into
apache:mainfrom
jonmmease:jonmmease/expr_default_features

Conversation

@jonmmease

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes#7624

Rationale for this change

Currently datafusion-common has a default feature of parquet. But some of the parquet functionality was not guarded by #[cfg(feature = "parquet")] conditionals, so it was not possible to compile the crate with the parquet feature disabled.

What changes are included in this PR?

This PR adds conditionals. It also sets default-features = false for all of the datafusion crates that depend on datafusion-common but don't require the parquet functionality.

Are these changes tested?

By adding default-features = false to the crates that depend on datafusion-common but don't need parquet support, we ensure that it's possible to compile datafusion-common without the default features.

Are there any user-facing changes?

no

@github-actionsgithub-actionsBot added sql SQL Planner logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates optimizer Optimizer rules sqllogictest SQL Logic Tests (.slt) labels Sep 22, 2023

@alambalamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @jonmmease -- this makes sense to me. I took the liberty of pushing a commit to this branch that fixes the cargo.toml formatting to get CI to pass.

@jonmmease

Copy link
Copy Markdown
ContributorAuthor

I took the liberty of pushing a commit to this branch that fixes the cargo.toml formatting to get CI to pass.

Thanks!

@alamb
alamb merged commit dab68a3 into apache:mainSep 22, 2023
Ted-Jiang pushed a commit to Ted-Jiang/arrow-datafusion that referenced this pull request Oct 7, 2023
apache#7625)
* Fix parquet optional in datafusion-common
* disable default datafusion-common features for dependent crates that don't need parquet
* fmt
* run tomlformat
---------
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

logical-exprLogical plan and expressionsoptimizerOptimizer rulesphysical-exprChanges to the physical-expr cratessqlSQL PlannersqllogictestSQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compilation errors when disabling default features in datafusion-common

2 participants

@jonmmease@alamb