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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]