View Unary Logical Operator
View
is a logical operator with a single child logical operator.
View
is created exclusively when SessionCatalog
is requested to find a relation in the catalogs (e.g. when DescribeTableCommand
logical command is executed and the table type is VIEW
).
View
is a MultiInstanceRelation so a new instance will be created to appear multiple times in a physical query plan. When requested for a new instance, View
creates new instances of the output attributes.
View
has the following simple description (with state prefix):
Note
|
View is resolved by ResolveRelations logical resolution.
|
Note
|
AliasViewChild logical analysis rule makes sure that the output of a View matches the output of the child logical operator.
|
Note
|
EliminateView logical optimization removes (eliminates) View operators from a logical query plan.
|
Creating View Instance
View
takes the following when created:
-
Output schema attributes (as
Seq[Attribute]
) -
Child logical plan