cloud-fan commented on code in PR #40856:
URL: https://github.com/apache/spark/pull/40856#discussion_r1173558023
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InlineCTE.scala:
##########
@@ -68,50 +69,91 @@ case class InlineCTE(alwaysInline: Boolean = false) extends
Rule[LogicalPlan] {
cteDef.child.exists(_.expressions.exists(_.isInstanceOf[OuterReference]))
}
+ /**
+ * Accumulates all the CTEs from a plan into a special map.
+ *
+ * @param plan The plan to collect the CTEs from
+ * @param cteMap A mutable map that accumulates the CTEs and their reference
information by CTE
+ * ids. The value of the map is tuple whose elements are:
+ * - The CTE definition
Review Comment:
```suggestion
* - The CTE definition ID
```
--
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]