nebojsa-db commented on code in PR #47180:
URL: https://github.com/apache/spark/pull/47180#discussion_r1667436898
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollectCTEDefinitions.scala:
##########
@@ -282,11 +283,15 @@ object CTESubstitution extends Rule[LogicalPlan] {
if (alwaysInline) {
d.child
} else {
- // Add a `SubqueryAlias` for hint-resolving rules to match
relation names.
- SubqueryAlias(table, CTERelationRef(d.id, d.resolved, d.output,
d.isStreaming))
+ // Add unresolved with CTE relations to the plan and we
+ // will do CTE resolution later in analyzer based on this node.
+ UnresolvedWithCTERelations(u, cteRelations)
}
}.getOrElse(u)
+ case p: PlanWithUnresolvedIdentifier =>
Review Comment:
I have made changes suggested in these comments, hopefully I understood
correctly what you suggested, please review :)
--
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]