fix: use datafusion_expr instead of datafusion crate in spark #21043
Open
davidlghellin wants to merge 1 commit intoapache:mainfrom
Open
fix: use datafusion_expr instead of datafusion crate in spark #21043davidlghellin wants to merge 1 commit intoapache:mainfrom
davidlghellin wants to merge 1 commit intoapache:mainfrom
Conversation
Contributor
Author
|
I see this error in #20725 |
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes datafusion-spark building in isolation by updating a few modules to import expression types directly from datafusion_expr rather than via datafusion::logical_expr, avoiding reliance on workspace-only dependency resolution.
Changes:
- Switched imports from
datafusion::logical_expr::{...}todatafusion_expr::{...}in three Spark function implementations. - Kept behavior unchanged (imports only), aligning with existing
datafusion-sparkusage patterns (other modules already import fromdatafusion_expr).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
datafusion/spark/src/function/math/bin.rs |
Uses datafusion_expr as the direct source for Signature, TypeSignature, Volatility, and related UDF types. |
datafusion/spark/src/function/bitmap/bitmap_bit_position.rs |
Updates expression-type imports to come from datafusion_expr, removing indirect dependency on datafusion. |
datafusion/spark/src/function/bitmap/bitmap_bucket_number.rs |
Same import correction as above to ensure standalone crate compilation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
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?
NA
Rationale for this change
Three files in
datafusion-sparkimport fromdatafusion::logical_exprinstead ofdatafusion_exprdirectly. This compiles fine in the full workspace but fails when building the crate in isolation (cargo clippy -p datafusion-spark).What changes are included in this PR?
Replaced
use datafusion::logical_expr::{...}withuse datafusion_expr::{...}in:datafusion/spark/src/function/bitmap/bitmap_bit_position.rsdatafusion/spark/src/function/bitmap/bitmap_bucket_number.rsdatafusion/spark/src/function/math/bin.rsNo logic changes — imports only.
Are these changes tested?
NA
Are there any user-facing changes?
NA