cloud-fan commented on a change in pull request #28490:
URL: https://github.com/apache/spark/pull/28490#discussion_r481649564
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -1525,6 +1573,17 @@ class Analyzer(
AttributeSet(projectList.collect { case a: Alias => a.toAttribute })
}
+ // This method is used to trim
groupByExpressions/selectedGroupByExpressions's top-level
+ // GetStructField Alias. Since these expression are not NamedExpression
originally,
+ // we are safely to trim top-level GetStructField Alias.
Review comment:
nit: `we are safe to ...`
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -1525,6 +1573,17 @@ class Analyzer(
AttributeSet(projectList.collect { case a: Alias => a.toAttribute })
}
+ // This method is used to trim
groupByExpressions/selectedGroupByExpressions's top-level
+ // GetStructField Alias. Since these expression are not NamedExpression
originally,
+ // we are safely to trim top-level GetStructField Alias.
+ def trimTopLevelGetStructFieldAlias(e: Expression): Expression = {
+ e match {
+ // trim Alias over top-level GetStructField
Review comment:
we can remove this now.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]