Skip to content

CreateView Logical Operator

CreateView is a BinaryCommand logical operator that represents CREATE VIEW AS SQL statement to create a persisted (non-temporary) view.

CreateViewCommand

CreateViewCommand logical operator is used to represent CREATE TEMPORARY VIEW AS SQL statements.

CreateView is resolved into CreateViewCommand logical operator by ResolveSessionCatalog logical analysis rule.

Creating Instance

CreateView takes the following to be created:

  • Child LogicalPlan
  • User-specified columns (Seq[(String, Option[String])])
  • Optional Comment
  • Properties (Map[String, String])
  • Optional "Original Text"
  • Logical Query Plan
  • allowExisting flag
  • replace flag

CreateView is created when: