Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/16233#discussion_r95061229
--- 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
--- End diff --
The flow on the documentation is a bit weird. I would remove the initial
section (that is implementation). For example:
> Make sure that a view's child plan produces the view's output attributes.
We wrap the child with a `Project` and add an alias for each output attribute.
The attributes are resolved by name. This should be only done after the
resolution batch, because the view attributes are not stable during resolution.
---
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]