cloud-fan commented on code in PR #43867:
URL: https://github.com/apache/spark/pull/43867#discussion_r1399149698


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -2505,12 +2505,14 @@ class Analyzer(override val catalogManager: 
CatalogManager) extends RuleExecutor
         outer: LogicalPlan)(
         f: (LogicalPlan, Seq[Expression]) => SubqueryExpression): 
SubqueryExpression = {
       val newSubqueryPlan = AnalysisContext.withOuterPlan(outer) {
-        executeSameContext(e.plan)
+        val analyzed = executeSameContext(e.plan)
+        checkAnalysis(analyzed)

Review Comment:
   My suggestion:
   1. do not check analysis here, but only set the analyzed flag.
   2. in `CheckAnalysis`, set the subquery plan as not `analyzed` before 
checking 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]

Reply via email to