Skip to content

Conversation

@phillipleblanc
Copy link
Contributor

@phillipleblanc phillipleblanc commented Apr 12, 2024

Which issue does this PR close?

Closes #10058

Rationale for this change

Makes it possible to actually disable the crypto features if they aren't required for a user of DataFusion.

What changes are included in this PR?

In addition to the main change that fixes the issue above, I realized that the crypto_expressions feature was added in two other crates that aren't using it anymore - so I removed them.

Are these changes tested?

I tested that building with no default features does actually disable the crypto dependencies.

Are there any user-facing changes?

This could be a breaking change if people disabled the default features and were still using a crypto function. I will lean on the more experienced contributors to weigh in here.

@github-actions github-actions bot added physical-expr Changes to the physical-expr crates optimizer Optimizer rules core Core DataFusion crate labels Apr 12, 2024
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The same reasoning that applies to crypto_expressions would also technically apply to all of the default features in this crate. Should we remove them as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

I just went through the Cargo.toml files and discovered that the defaults are kinda b0rken in multiple places. I think another ticket would be in order - or else this ticket should be just titled 'fix the expression feature defaults to allow for proper disabling of features' and all the fixes done here.

Copy link
Contributor

Choose a reason for hiding this comment

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

yes I think we should remove them as well - these are left overs

@phillipleblanc phillipleblanc changed the title Disable crypto_expressions properly Disable crypto_expressions feature properly for --no-default-features Apr 12, 2024
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 @phillipleblanc and @Omega359 for the review

I agree that more cleanup in this area would be beneficial, but I also think this PR is a nice cleanup in itself. Thank you 🙏

Copy link
Contributor

Choose a reason for hiding this comment

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

yes I think we should remove them as well - these are left overs

[features]
crypto_expressions = ["datafusion-physical-expr/crypto_expressions"]
default = ["crypto_expressions", "regex_expressions"]
default = ["regex_expressions"]
Copy link
Contributor

Choose a reason for hiding this comment

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

even the regex_expressions doesn't make much sense here anymore

@alamb alamb merged commit 6872800 into apache:main Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate optimizer Optimizer rules physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not possible to disable crypto_expressions feature as a library user of DataFusion.

4 participants