Ngone51 commented on a change in pull request #27263: [SPARK-30433][SQL][FOLLOW-UP] Optimize collect conflict plans URL: https://github.com/apache/spark/pull/27263#discussion_r368384580
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala ########## @@ -1106,14 +1108,19 @@ class Analyzer( attr } } - (oldVersion, oldVersion.copy(output = newOutput)) + Seq((oldVersion, oldVersion.copy(output = newOutput))) case oldVersion @ Window(windowExpressions, _, _, child) if AttributeSet(windowExpressions.map(_.toAttribute)).intersect(conflictingAttributes) - .nonEmpty => - (oldVersion, oldVersion.copy(windowExpressions = newAliases(windowExpressions))) + .nonEmpty => + Seq((oldVersion, oldVersion.copy(windowExpressions = newAliases(windowExpressions)))) + + case _ => plan.children.flatMap(collectConflictPlans) } + val conflictPlans = collectConflictPlans(right) Review comment: Added(on the top of `collectConflictPlans`). ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org