cloud-fan commented on code in PR #57301:
URL: https://github.com/apache/spark/pull/57301#discussion_r3601908323
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveReferencesInAggregate.scala:
##########
@@ -65,7 +65,7 @@ class ResolveReferencesInAggregate(val catalogManager:
CatalogManager) extends S
resolveExpressionByPlanChildren(_, planForResolve))
val resolvedAggExprsWithLCA =
resolveLateralColumnAlias(resolvedAggExprsBasic)
val resolvedAggExprsFinal =
resolvedAggExprsWithLCA.map(resolveColsLastResort)
- .map(_.asInstanceOf[NamedExpression])
+ .map(e => aliasIfOuterReference(e.asInstanceOf[NamedExpression]))
Review Comment:
Please add a focused analyzer case where a bare outer reference is an
Aggregate output. The changed Aggregate path is not exercised by the updated
test or golden diffs, so this would lock in its fresh ExprId behavior.
--
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]