Github user felixcheung commented on a diff in the pull request:
https://github.com/apache/spark/pull/9343#discussion_r43342070
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala
---
@@ -146,7 +146,11 @@ case class Alias(child: Expression, name: String)(
override def toAttribute: Attribute = {
if (resolved) {
- AttributeReference(name, child.dataType, child.nullable,
metadata)(exprId, qualifiers)
+ // Append the name of the alias as a qualifier. This lets us resolve
things like:
+ // (SELECT struct(a,b) AS x FROM ...).SELECT x.*
+ // TODO: is this the best way to do this? Should Alias just have
nameas the qualifier?
--- End diff --
'nameas' -> 'name as'?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]