mihailotim-db commented on code in PR #55606:
URL: https://github.com/apache/spark/pull/55606#discussion_r3182760477
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -1868,7 +1868,14 @@ class Analyzer(
// Only Project, Aggregate, CollectMetrics can host star
expressions.
case u @ (_: Project | _: Aggregate | _: CollectMetrics) =>
Try(s.expand(u.children.head, resolver)) match {
- case Success(expanded) => expanded.map(wrapOuterReference)
+ case Success(expanded) =>
+ expanded.map {
+ case alias: Alias =>
+
alias.withNewChildren(Seq(wrapOuterReference(alias.child)))
+ .asInstanceOf[Alias]
+ case e =>
+ Alias(wrapOuterReference(e), toPrettySQL(e))()
Review Comment:
No longer applicable — the match block was removed from expand(). The new
aliasIfOuterReference helper uses case _ => e which doesn't shadow anything.
--
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]