You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/02/13 18:13:10 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #27562: [SPARK-30811][SQL][2.4] CTE should not cause stack overflow when it refers to non-existent table with same name

dongjoon-hyun commented on a change in pull request #27562: [SPARK-30811][SQL][2.4] CTE should not cause stack overflow when it refers to non-existent table with same name
URL: https://github.com/apache/spark/pull/27562#discussion_r379032159
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ##########
 @@ -215,8 +215,8 @@ class Analyzer(
     }
 
     def substituteCTE(plan: LogicalPlan, cteRelations: Seq[(String, LogicalPlan)]): LogicalPlan = {
-      plan resolveOperatorsDown {
-        case u: UnresolvedRelation =>
+      plan resolveOperatorsUp {
 
 Review comment:
   Also, could you make a unit test for this change? Actually, for the current test case, line 219 looks enough to me.
   > CTESubstitution transforms down, this means it will keep replacing t with itself, creating an infinite recursion.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org