Reduce datafusion-spark dependency footprint - #24351
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24351 +/- ##
==========================================
- Coverage 81.17% 81.17% -0.01%
==========================================
Files 1109 1109
Lines 388038 388038
Branches 388038 388038
==========================================
- Hits 314992 314983 -9
- Misses 54507 54512 +5
- Partials 18539 18543 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
Thank you for the fix. There is already the same check in CI But it's not detecting those dependencies, perhaps we should update the CI first. |
Dandandan
approved these changes
Aug 14, 2026
Member
Author
Hi thanks for the quick reply! I double confirmed with my agent, it's not Machete -- Machete considers datafusion-catalog and datafusion-execution used because their names appeared in imports, even though they only re-exported types from narrower crates. The prompt I gave is |
Jefffrey
approved these changes
Aug 14, 2026
imtherealnaska
pushed a commit
to imtherealnaska/datafusion
that referenced
this pull request
Aug 16, 2026
## Which issue does this PR close? N/A ## Rationale for this change `datafusion-spark` pulls unnecessary crates into its production dependency graph, increasing compilation time and artifact size for downstream users. ## What changes are included in this PR? - Replace compatibility re-exports with the narrower crates that define `TableFunction` and `FunctionRegistry`. - Remove the unused `crypto_expressions` activation; Spark provides its own SHA-1, SHA-2, and CRC32 implementations. - Fix the `quote` import so builds without the optional `core` feature continue to compile. These changes reduce the production dependency graph from 279 to 257 packages. Cargo Machete does not report these dependencies because they are referenced in source through re-exports or activated through Cargo features. ## Are these changes tested? Yes ## Are there any user-facing changes? No. Public APIs and default behavior remain unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
N/A
Rationale for this change
datafusion-sparkpulls unnecessary crates into its production dependency graph, increasing compilation time and artifact size for downstream users.What changes are included in this PR?
TableFunctionandFunctionRegistry.crypto_expressionsactivation; Spark provides its own SHA-1, SHA-2, and CRC32 implementations.quoteimport so builds without the optionalcorefeature continue to compile.These changes reduce the production dependency graph from 279 to 257 packages. Cargo Machete does not report these dependencies because they are referenced in source through re-exports or activated through Cargo features.
Are these changes tested?
Yes
Are there any user-facing changes?
No. Public APIs and default behavior remain unchanged.