neilconway commented on PR #22037: URL: https://github.com/apache/datafusion/pull/22037#issuecomment-4547755017
> It is not identical to UNION structurally: UNION stores an explicit schema on the logical node, while RecursiveQuery still exposes schema via the coerced static term (instead of adding a new DFSchema field to RecursiveQuery, which is a pub struct with pub fields and therefore part of the public API surface). Logical plan nodes whose output schema differs from their input schema almost always store an explicit schema (Values, Window, Aggregate, DistinctOn, Unnest, EmptyRelation, Projection, etc). I think storing an explicit schema in RecursiveQuery would make this PR simpler and make the CTE case more consistent with other schema-changing plan nodes. Re: changing a pub struct, that happens routinely, so I don't think that's a strong reason to avoid going down this path by itself. I might take a look at prototyping this approach to see if it is indeed simpler 😊 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
