Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/16233#discussion_r95061267
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
---
@@ -767,7 +857,45 @@ class Analyzer(
}
}
- /**
+ /**
+ * Alias the output of a view's child to the output of the view, the
corresponding attribute is
+ * searched by name. If the corresponding attribute is not found, throw
an AnalysisException.
+ * On the resolution of the view, the output attributes are generated
from the view schema, and
+ * the view query is resolved later. After the view attributes have been
stabilized(when the
+ * resolution batch has finished), we add a Project operator over the
child, so that we could
+ * alias the output of the child plan to the view's output attributes.
+ * TODO: Also check the dataTypes and nullabilites of the output.
--- End diff --
top level attributes are always null right?
---
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]