You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/01 13:01:01 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #28490: [SPARK-31670][SQL] Trim unnecessary Struct field alias in Aggregate/GroupingSets
cloud-fan commented on a change in pull request #28490:
URL: https://github.com/apache/spark/pull/28490#discussion_r481118979
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -1325,25 +1325,54 @@ class Analyzer(
*
* Note : In this routine, the unresolved attributes are resolved from the input plan's
* children attributes.
+ *
+ * @param e The expression need to be resolved.
+ * @param q The LogicalPlan whose children are used to resolve expression's attribute.
+ * @param trimAlias When true, we will trim Struct field alias. When isTopLevel = true,
Review comment:
there is no `isTopLevel` parameter here.
```
When true, trim unnecessary alias of `GetStructField`. Note that, we cannot trim
the alias of top-level `GetStructField`, as we should resolve `UnresolvedAttribute` to
a named expression. The caller side can trim the alias of top-level `GetStructField` if
it's safe to do so.
```
Just let the caller side know that this method only trims alias of non-top-level `GetStructField`, and why.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org