EnricoMi commented on code in PR #39754: URL: https://github.com/apache/spark/pull/39754#discussion_r1699637556
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala: ########## @@ -3468,6 +3448,52 @@ class Analyzer(override val catalogManager: CatalogManager) extends RuleExecutor } } + /** + * Restricts the scope of resolving some expressions. + */ + object ScopeExpressions extends Rule[LogicalPlan] { + private def scopeOrder(scope: Seq[Attribute])(sortOrder: SortOrder): SortOrder = { + sortOrder match { + case so if so.child.isInstanceOf[ScopedExpression] => so + case so => so.copy(child = ScopedExpression(so.child, scope)) Review Comment: Added in e53c7a2166b5f9b25bd7624f5cbb8276be3e0585. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org