milanisvet commented on code in PR #49232:
URL: https://github.com/apache/spark/pull/49232#discussion_r1901529655


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CTESubstitution.scala:
##########
@@ -308,7 +399,10 @@ object CTESubstitution extends Rule[LogicalPlan] {
         p.copy(planBuilder = (nameParts, children) => {
           p.planBuilder.apply(nameParts, children) match {
             case u @ UnresolvedRelation(Seq(table), _, _) =>
-              resolveWithCTERelations(table, alwaysInline, cteRelations, u)
+              val resolved = resolveWithCTERelations(table, alwaysInline,
+                (recursiveCTERelation ++ cteRelations).toSeq, u)
+              recursionFound = resolved._2

Review Comment:
   Resolved with the new refactoring (removing `CTERelationDef#recursive` and 
making it as a lazy function). Identifier should be supported now as well.



-- 
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]

Reply via email to