EnricoMi commented on code in PR #39754: URL: https://github.com/apache/spark/pull/39754#discussion_r1090847819
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala: ########## @@ -409,6 +409,20 @@ case class PrettyAttribute( override def nullable: Boolean = true } +/** + * An expression that has to be resolved against a scope of resolved attributes. + */ +case class ScopedExpression(child: Expression, scope: AttributeSeq) Review Comment: One unsolved problem here is when attributes in `scope` get rewritten elsewhere in the plan, they should be rewritten in `scope` as well. For instance, `DeduplicateRelations` rule. https://github.com/G-Research/spark/compare/branch-append-columns-improvements...G-Research:spark:branch-cogroup-self-deduplication-bug-after-append-column#diff-b98c99535d2b28cb47774860d500030e732c244c55b1ac05aead5d1cf1e7a602R1015-R1025 -- 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]
