cloud-fan commented on code in PR #53646:
URL: https://github.com/apache/spark/pull/53646#discussion_r2653152875
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -1069,6 +1069,13 @@ class Analyzer(
case view: View if !view.child.resolved =>
ViewResolution
.resolve(view, options, resolveChild = executeSameContext,
checkAnalysis = checkAnalysis)
+ // Resolve V2TableReference nodes in already-resolved views (e.g., temp
views storing
+ // analyzed plans). V2TableReference is a placeholder for DSv2 tables
that needs to be
+ // resolved to DataSourceV2Relation on each view access.
+ case view: View =>
Review Comment:
This is a safe guard. If the view is already resolved (e.g. df temp view),
we don't resolve its body, so it still contains `V2TableReference`. Ideally
it's OK as the next analyzer rule execution iteration will replace it, but in
case the fixed point happens to be reached, here we eagerly replace it.
--
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]