fix: bump DataFusion to 54.1.0 and adapt to RecursiveQuery API change#1645
Open
andygrove wants to merge 1 commit into
Open
fix: bump DataFusion to 54.1.0 and adapt to RecursiveQuery API change#1645andygrove wants to merge 1 commit into
andygrove wants to merge 1 commit into
Conversation
DataFusion 54.1.0 added a `schema` field to `RecursiveQuery`, breaking the struct literal in `PyRecursiveQuery::new()`. Build the node through the new fallible `RecursiveQuery::try_new()` constructor, which reconciles the schema of the static and recursive terms. Pin the workspace requirements to `54.1` so the build cannot resolve back to 54.0.0, which no longer satisfies this code.
Member
Author
|
@timsaucer for context, Ballista Rust crates upgraded to 54.1.0 to bring in a needed correctness fix, but the Ballista Python module could not upgrade due to the breaking API change in DF 54.1.0 |
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?
Closes #1644.
Rationale for this change
The workspace dependencies were declared as
version = "54", so Cargo was freeto resolve them to DataFusion 54.1.0 — but the crate no longer compiled when it
did. DataFusion 54.1.0 added a
schema: DFSchemaReffield todatafusion_expr::logical_plan::RecursiveQuery, andPyRecursiveQuery::new()built that struct with a literal initializer:
What changes are included in this PR?
"54"to"54.1"and updateCargo.lockto 54.1.0. Pinning the minor version keeps the build from silentlyresolving back to 54.0.0, which no longer satisfies the code below.
RecursiveQuerythrough the newRecursiveQuery::try_new()constructorinstead of a struct literal.
try_new()computes the output schema byreconciling the static and recursive terms, so it is fallible;
PyRecursiveQuery::new()now returnsPyDataFusionResult<Self>.test_recursive_queryto round-trip the node back through the Pythonconstructor, covering the new schema-reconciliation path.
Are there any user-facing changes?
datafusion.expr.RecursiveQuery(...)can now raise when the static andrecursive terms do not have the same number of columns. Previously such
arguments produced a
RecursiveQuerynode that was invalid downstream, so thisturns a late failure into an immediate one. No other public API changes.