This is an automated email from the ASF dual-hosted git repository. github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-23991-67502a364c283144c085988b93f014232eca5768 in repository https://gitbox.apache.org/repos/asf/datafusion.git
commit bb45fb8275bf6370923ac40bfb3dd5712b640e97 Author: Alvaro Balbin <[email protected]> AuthorDate: Sat Aug 15 11:16:18 2026 +0000 docs(upgrading): document RecursiveQuery schema field in upgrade guide (#23991) Adding the `schema` field to `RecursiveQuery` broke downstream code that built the node with a struct literal, and the change was never written up for people upgrading. I added an upgrade guide entry for 55.0.0 that describes what changed, notes it also shipped in 54.1.0 so users on the 54 series find it, and shows how to move to `RecursiveQuery::try_new`. It is documentation only, so whether to revert the change on `branch-54` for 54.2.0 is still an open question. I pushed this to my fork first and the project's own CI workflows pass on the commit. Fixes #23886. Co-authored-by: Andrew Lamb <[email protected]> --- docs/source/library-user-guide/upgrading/55.0.0.md | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docs/source/library-user-guide/upgrading/55.0.0.md b/docs/source/library-user-guide/upgrading/55.0.0.md index 21def5a1fc..b0f2602d31 100644 --- a/docs/source/library-user-guide/upgrading/55.0.0.md +++ b/docs/source/library-user-guide/upgrading/55.0.0.md @@ -1109,6 +1109,41 @@ let plan = deserialize_bytes(&proto_bytes)?; See [PR #23827](https://github.com/apache/datafusion/pull/23827) for details. +### `RecursiveQuery` gained a `schema` field + +`datafusion_expr::logical_plan::RecursiveQuery` exposed the static (anchor) term's +schema to parent plans, which ignored columns that only the recursive term makes +nullable. The node now stores the schema reconciled from both terms explicitly, so +it can no longer be built with an exhaustive struct literal. + +**Who is affected:** + +- Code constructing `RecursiveQuery` with a struct literal. This change also + shipped in `54.1.0`, so the same migration applies within the `54` series. + +**Migration guide:** + +Build the node with `RecursiveQuery::try_new`, which computes the schema and +returns an error if the two terms do not have the same number of columns: + +```rust,ignore +// Before +let query = RecursiveQuery { + name, + static_term, + recursive_term, + is_distinct, +}; + +// After +let query = RecursiveQuery::try_new(name, static_term, recursive_term, is_distinct)?; +``` + +`RecursiveQueryExec::try_new` takes the reconciled schema as its second argument +for the same reason, rather than deriving it from its children. + +See [PR #22552](https://github.com/apache/datafusion/pull/22552) for details. + ### `ExecutionPlan::apply_expressions` is now a required method `apply_expressions` has been added as a **required** method on the `ExecutionPlan`, `FileSource`, and `DataSource` traits. Any custom implementation of --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
