andreaschat-db commented on code in PR #56121:
URL: https://github.com/apache/spark/pull/56121#discussion_r3372610858
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -2549,6 +2548,15 @@ class Analyzer(
case a: FunctionTableSubqueryArgumentExpression if !a.plan.resolved =>
resolveSubQuery(a, outer)(
(plan, outerAttrs) => a.copy(plan = plan, outerAttrs = outerAttrs))
+ // The subquery's plan is already resolved. Replace any
V2TableReferences without
+ // re-running any analyzer rules.
+ case se: SubqueryExpression
+ if se.plan.resolved &&
+ se.plan.collectFirstWithSubqueries { case _: V2TableReference
=> () }.isDefined =>
+ val newPlan = se.plan.transformWithSubqueries {
+ case r: V2TableReference => relationResolution.resolveReference(r)
Review Comment:
@gengliangwang answered this below. In short, yes. Relation cache is
maintained per query.
--
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]