cloud-fan commented on code in PR #42036:
URL: https://github.com/apache/spark/pull/42036#discussion_r1272959723
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala:
##########
@@ -887,6 +887,16 @@ case class WithCTE(plan: LogicalPlan, cteDefs:
Seq[CTERelationDef]) extends Logi
}
}
+/**
+ * The logical node which is able to place the `WithCTE` node on its children.
+ */
+trait CTEInChildren extends LogicalPlan {
+ def withCTEDefs(cteDefs: Seq[CTERelationDef]): LogicalPlan = {
+ withNewChildren(children.map(WithCTE(_, cteDefs)))
Review Comment:
It seems fine to have multiple children, we just duplicate the CTE
relations. The current code does not allow it though, and go back to inline CTE.
--
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]