Packages

case class CreateViewCommand(name: TableIdentifier, userSpecifiedColumns: Seq[(String, Option[String])], comment: Option[String], properties: Map[String, String], originalText: Option[String], plan: LogicalPlan, allowExisting: Boolean, replace: Boolean, viewType: ViewType, isAnalyzed: Boolean = false, referredTempFunctions: Seq[String] = Seq.empty) extends LogicalPlan with RunnableCommand with AnalysisOnlyCommand with Product with Serializable

Create or replace a view with given query plan. This command will generate some view-specific properties(e.g. view default database, view query output column names) and store them as properties in metastore, if we need to create a permanent view.

name

the name of this view.

userSpecifiedColumns

the output column names and optional comments specified by users, can be Nil if not specified.

comment

the comment of this view.

properties

the properties of this view.

originalText

the original SQL text of this view, can be None if this view is created via Dataset API.

plan

the logical plan that represents the view; this is used to generate the logical plan for temporary view and the view schema.

allowExisting

if true, and if the view already exists, noop; if false, and if the view already exists, throws analysis exception.

replace

if true, and if the view already exists, updates it; if false, and if the view already exists, throws analysis exception.

viewType

the expected view type to be created with this command.

isAnalyzed

whether this command is analyzed or not.

Linear Supertypes
Serializable, AnalysisOnlyCommand, RunnableCommand, Command, LogicalPlan, Logging, QueryPlanConstraints, ConstraintHelper, LogicalPlanDistinctKeys, LogicalPlanStats, AnalysisHelper, QueryPlan[LogicalPlan], SQLConfHelper, TreeNode[LogicalPlan], WithOrigin, TreePatternBits, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CreateViewCommand
  2. Serializable
  3. AnalysisOnlyCommand
  4. RunnableCommand
  5. Command
  6. LogicalPlan
  7. Logging
  8. QueryPlanConstraints
  9. ConstraintHelper
  10. LogicalPlanDistinctKeys
  11. LogicalPlanStats
  12. AnalysisHelper
  13. QueryPlan
  14. SQLConfHelper
  15. TreeNode
  16. WithOrigin
  17. TreePatternBits
  18. Product
  19. Equals
  20. AnyRef
  21. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new CreateViewCommand(name: TableIdentifier, userSpecifiedColumns: Seq[(String, Option[String])], comment: Option[String], properties: Map[String, String], originalText: Option[String], plan: LogicalPlan, allowExisting: Boolean, replace: Boolean, viewType: ViewType, isAnalyzed: Boolean = false, referredTempFunctions: Seq[String] = Seq.empty)

    name

    the name of this view.

    userSpecifiedColumns

    the output column names and optional comments specified by users, can be Nil if not specified.

    comment

    the comment of this view.

    properties

    the properties of this view.

    originalText

    the original SQL text of this view, can be None if this view is created via Dataset API.

    plan

    the logical plan that represents the view; this is used to generate the logical plan for temporary view and the view schema.

    allowExisting

    if true, and if the view already exists, noop; if false, and if the view already exists, throws analysis exception.

    replace

    if true, and if the view already exists, updates it; if false, and if the view already exists, throws analysis exception.

    viewType

    the expected view type to be created with this command.

    isAnalyzed

    whether this command is analyzed or not.

Value Members

  1. lazy val allAttributes: AttributeSeq
    Definition Classes
    QueryPlan
  2. val allowExisting: Boolean
  3. def analyzed: Boolean
    Definition Classes
    AnalysisHelper
  4. def apply(number: Int): TreeNode[_]
    Definition Classes
    TreeNode
  5. def argString(maxFields: Int): String
    Definition Classes
    TreeNode
  6. def asCode: String
    Definition Classes
    TreeNode
  7. final lazy val canonicalized: LogicalPlan
    Definition Classes
    QueryPlan
    Annotations
    @transient()
  8. final def children: Seq[LogicalPlan]
    Definition Classes
    AnalysisOnlyCommand → TreeNode
  9. def childrenResolved: Boolean
    Definition Classes
    LogicalPlan
  10. def childrenToAnalyze: Seq[LogicalPlan]
    Definition Classes
    CreateViewCommand → AnalysisOnlyCommand
  11. def clone(): LogicalPlan
    Definition Classes
    AnalysisHelper → TreeNode → AnyRef
  12. def collect[B](pf: PartialFunction[LogicalPlan, B]): Seq[B]
    Definition Classes
    TreeNode
  13. def collectFirst[B](pf: PartialFunction[LogicalPlan, B]): Option[B]
    Definition Classes
    TreeNode
  14. def collectLeaves(): Seq[LogicalPlan]
    Definition Classes
    TreeNode
  15. def collectWithSubqueries[B](f: PartialFunction[LogicalPlan, B]): Seq[B]
    Definition Classes
    QueryPlan
  16. val comment: Option[String]
  17. def conf: SQLConf
    Definition Classes
    SQLConfHelper
  18. lazy val constraints: ExpressionSet
    Definition Classes
    QueryPlanConstraints
  19. def constructIsNotNullConstraints(constraints: ExpressionSet, output: Seq[Attribute]): ExpressionSet
    Definition Classes
    ConstraintHelper
  20. final def containsAllPatterns(patterns: TreePattern*): Boolean
    Definition Classes
    TreePatternBits
  21. final def containsAnyPattern(patterns: TreePattern*): Boolean
    Definition Classes
    TreePatternBits
  22. lazy val containsChild: Set[TreeNode[_]]
    Definition Classes
    TreeNode
  23. final def containsPattern(t: TreePattern): Boolean
    Definition Classes
    TreePatternBits
    Annotations
    @inline()
  24. def copyTagsFrom(other: LogicalPlan): Unit
    Definition Classes
    TreeNode
  25. lazy val deterministic: Boolean
    Definition Classes
    QueryPlan
  26. lazy val distinctKeys: Set[ExpressionSet]
    Definition Classes
    LogicalPlanDistinctKeys
  27. def exists(f: (LogicalPlan) => Boolean): Boolean
    Definition Classes
    TreeNode
  28. final def expressions: Seq[Expression]
    Definition Classes
    QueryPlan
  29. def fastEquals(other: TreeNode[_]): Boolean
    Definition Classes
    TreeNode
  30. def find(f: (LogicalPlan) => Boolean): Option[LogicalPlan]
    Definition Classes
    TreeNode
  31. def flatMap[A](f: (LogicalPlan) => TraversableOnce[A]): Seq[A]
    Definition Classes
    TreeNode
  32. def foreach(f: (LogicalPlan) => Unit): Unit
    Definition Classes
    TreeNode
  33. def foreachUp(f: (LogicalPlan) => Unit): Unit
    Definition Classes
    TreeNode
  34. def generateTreeString(depth: Int, lastChildren: ArrayList[Boolean], append: (String) => Unit, verbose: Boolean, prefix: String, addSuffix: Boolean, maxFields: Int, printNodeId: Boolean, indent: Int): Unit
    Definition Classes
    TreeNode
  35. def getMetadataAttributeByName(name: String): AttributeReference
    Definition Classes
    LogicalPlan
  36. def getMetadataAttributeByNameOpt(name: String): Option[AttributeReference]
    Definition Classes
    LogicalPlan
  37. def getTagValue[T](tag: TreeNodeTag[T]): Option[T]
    Definition Classes
    TreeNode
  38. def hashCode(): Int
    Definition Classes
    TreeNode → AnyRef → Any
  39. def inferAdditionalConstraints(constraints: ExpressionSet): ExpressionSet
    Definition Classes
    ConstraintHelper
  40. def innerChildren: Seq[QueryPlan[_]]
    Definition Classes
    AnalysisOnlyCommand → QueryPlan → TreeNode
  41. def inputSet: AttributeSet
    Definition Classes
    QueryPlan
  42. final def invalidateStatsCache(): Unit
    Definition Classes
    LogicalPlanStats
  43. val isAnalyzed: Boolean
    Definition Classes
    CreateViewCommand → AnalysisOnlyCommand
  44. def isStreaming: Boolean
    Definition Classes
    LogicalPlan
  45. def makeCopy(newArgs: Array[AnyRef]): LogicalPlan
    Definition Classes
    TreeNode
  46. def map[A](f: (LogicalPlan) => A): Seq[A]
    Definition Classes
    TreeNode
  47. def mapChildren(f: (LogicalPlan) => LogicalPlan): LogicalPlan
    Definition Classes
    TreeNode
  48. def mapExpressions(f: (Expression) => Expression): CreateViewCommand.this.type
    Definition Classes
    QueryPlan
  49. def markAsAnalyzed(analysisContext: AnalysisContext): LogicalPlan
    Definition Classes
    CreateViewCommand → AnalysisOnlyCommand
  50. def maxRows: Option[Long]
    Definition Classes
    LogicalPlan
  51. def maxRowsPerPartition: Option[Long]
    Definition Classes
    LogicalPlan
  52. def metadataOutput: Seq[Attribute]
    Definition Classes
    LogicalPlan
  53. lazy val metrics: Map[String, SQLMetric]
    Definition Classes
    RunnableCommand
  54. final def missingInput: AttributeSet
    Definition Classes
    QueryPlan
  55. def multiTransformDown(rule: PartialFunction[LogicalPlan, Seq[LogicalPlan]]): Stream[LogicalPlan]
    Definition Classes
    TreeNode
  56. def multiTransformDownWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[LogicalPlan, Seq[LogicalPlan]]): Stream[LogicalPlan]
    Definition Classes
    TreeNode
  57. val name: TableIdentifier
  58. def nodeName: String
    Definition Classes
    TreeNode
  59. final val nodePatterns: Seq[TreePattern]
    Definition Classes
    Command → TreeNode
  60. def numberedTreeString: String
    Definition Classes
    TreeNode
  61. val origin: Origin
    Definition Classes
    TreeNode → WithOrigin
  62. val originalText: Option[String]
  63. def output: Seq[Attribute]
    Definition Classes
    Command → QueryPlan
  64. def outputOrdering: Seq[SortOrder]
    Definition Classes
    QueryPlan
  65. lazy val outputSet: AttributeSet
    Definition Classes
    QueryPlan
    Annotations
    @transient()
  66. def p(number: Int): LogicalPlan
    Definition Classes
    TreeNode
  67. val plan: LogicalPlan
  68. def prettyJson: String
    Definition Classes
    TreeNode
  69. def printSchema(): Unit
    Definition Classes
    QueryPlan
  70. def producedAttributes: AttributeSet
    Definition Classes
    Command → QueryPlan
  71. def productElementNames: Iterator[String]
    Definition Classes
    Product
  72. val properties: Map[String, String]
  73. lazy val references: AttributeSet
    Definition Classes
    QueryPlan
    Annotations
    @transient()
  74. val referredTempFunctions: Seq[String]
  75. def refresh(): Unit
    Definition Classes
    LogicalPlan
  76. val replace: Boolean
  77. def resolve(nameParts: Seq[String], resolver: Resolver): Option[NamedExpression]
    Definition Classes
    LogicalPlan
  78. def resolve(schema: StructType, resolver: Resolver): Seq[Attribute]
    Definition Classes
    LogicalPlan
  79. def resolveChildren(nameParts: Seq[String], resolver: Resolver): Option[NamedExpression]
    Definition Classes
    LogicalPlan
  80. def resolveExpressions(r: PartialFunction[Expression, Expression]): LogicalPlan
    Definition Classes
    AnalysisHelper
  81. def resolveExpressionsWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): LogicalPlan
    Definition Classes
    AnalysisHelper
  82. def resolveOperators(rule: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    AnalysisHelper
  83. def resolveOperatorsDown(rule: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    AnalysisHelper
  84. def resolveOperatorsDownWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    AnalysisHelper
  85. def resolveOperatorsUp(rule: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    AnalysisHelper
  86. def resolveOperatorsUpWithNewOutput(rule: PartialFunction[LogicalPlan, (LogicalPlan, Seq[(Attribute, Attribute)])]): LogicalPlan
    Definition Classes
    AnalysisHelper
  87. def resolveOperatorsUpWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    AnalysisHelper
  88. def resolveOperatorsWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    AnalysisHelper
  89. def resolveQuoted(name: String, resolver: Resolver): Option[NamedExpression]
    Definition Classes
    LogicalPlan
  90. lazy val resolved: Boolean
    Definition Classes
    LogicalPlan
  91. def rewriteAttrs(attrMap: AttributeMap[Attribute]): LogicalPlan
    Definition Classes
    QueryPlan
  92. def run(sparkSession: SparkSession): Seq[Row]
    Definition Classes
    CreateViewCommandRunnableCommand
  93. def sameOutput(other: LogicalPlan): Boolean
    Definition Classes
    LogicalPlan
  94. final def sameResult(other: LogicalPlan): Boolean
    Definition Classes
    QueryPlan
  95. lazy val schema: StructType
    Definition Classes
    QueryPlan
  96. def schemaString: String
    Definition Classes
    QueryPlan
  97. final def semanticHash(): Int
    Definition Classes
    QueryPlan
  98. def setTagValue[T](tag: TreeNodeTag[T], value: T): Unit
    Definition Classes
    TreeNode
  99. def simpleString(maxFields: Int): String
    Definition Classes
    QueryPlan → TreeNode
  100. def simpleStringWithNodeId(): String
    Definition Classes
    QueryPlan → TreeNode
  101. def stats: Statistics
    Definition Classes
    Command → LogicalPlanStats
  102. lazy val subqueries: Seq[LogicalPlan]
    Definition Classes
    QueryPlan
    Annotations
    @transient()
  103. def subqueriesAll: Seq[LogicalPlan]
    Definition Classes
    QueryPlan
  104. def toJSON: String
    Definition Classes
    TreeNode
  105. def toString(): String
    Definition Classes
    TreeNode → AnyRef → Any
  106. def transform(rule: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    TreeNode
  107. def transformAllExpressions(rule: PartialFunction[Expression, Expression]): CreateViewCommand.this.type
    Definition Classes
    QueryPlan
  108. def transformAllExpressionsWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): CreateViewCommand.this.type
    Definition Classes
    AnalysisHelper → QueryPlan
  109. def transformAllExpressionsWithSubqueries(rule: PartialFunction[Expression, Expression]): CreateViewCommand.this.type
    Definition Classes
    QueryPlan
  110. def transformDown(rule: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    TreeNode
  111. def transformDownWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    AnalysisHelper → TreeNode
  112. def transformDownWithSubqueries(f: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    QueryPlan
  113. def transformDownWithSubqueriesAndPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(f: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    QueryPlan
  114. def transformExpressions(rule: PartialFunction[Expression, Expression]): CreateViewCommand.this.type
    Definition Classes
    QueryPlan
  115. def transformExpressionsDown(rule: PartialFunction[Expression, Expression]): CreateViewCommand.this.type
    Definition Classes
    QueryPlan
  116. def transformExpressionsDownWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): CreateViewCommand.this.type
    Definition Classes
    QueryPlan
  117. def transformExpressionsUp(rule: PartialFunction[Expression, Expression]): CreateViewCommand.this.type
    Definition Classes
    QueryPlan
  118. def transformExpressionsUpWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): CreateViewCommand.this.type
    Definition Classes
    QueryPlan
  119. def transformExpressionsWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): CreateViewCommand.this.type
    Definition Classes
    QueryPlan
  120. def transformUp(rule: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    TreeNode
  121. def transformUpWithBeforeAndAfterRuleOnChildren(cond: (LogicalPlan) => Boolean, ruleId: RuleId)(rule: PartialFunction[(LogicalPlan, LogicalPlan), LogicalPlan]): LogicalPlan
    Definition Classes
    TreeNode
  122. def transformUpWithNewOutput(rule: PartialFunction[LogicalPlan, (LogicalPlan, Seq[(Attribute, Attribute)])], skipCond: (LogicalPlan) => Boolean, canGetOutput: (LogicalPlan) => Boolean): LogicalPlan
    Definition Classes
    AnalysisHelper → QueryPlan
  123. def transformUpWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    AnalysisHelper → TreeNode
  124. def transformUpWithSubqueries(f: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    QueryPlan
  125. def transformWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    TreeNode
  126. def transformWithSubqueries(f: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan
    Definition Classes
    QueryPlan
  127. lazy val treePatternBits: BitSet
    Definition Classes
    QueryPlan → TreeNode → TreePatternBits
  128. def treeString(append: (String) => Unit, verbose: Boolean, addSuffix: Boolean, maxFields: Int, printOperatorId: Boolean): Unit
    Definition Classes
    TreeNode
  129. final def treeString(verbose: Boolean, addSuffix: Boolean, maxFields: Int, printOperatorId: Boolean): String
    Definition Classes
    TreeNode
  130. final def treeString: String
    Definition Classes
    TreeNode
  131. def unsetTagValue[T](tag: TreeNodeTag[T]): Unit
    Definition Classes
    TreeNode
  132. def updateOuterReferencesInSubquery(plan: LogicalPlan, attrMap: AttributeMap[Attribute]): LogicalPlan
    Definition Classes
    AnalysisHelper → QueryPlan
  133. val userSpecifiedColumns: Seq[(String, Option[String])]
  134. def verboseString(maxFields: Int): String
    Definition Classes
    QueryPlan → TreeNode
  135. def verboseStringWithOperatorId(): String
    Definition Classes
    QueryPlan
  136. def verboseStringWithSuffix(maxFields: Int): String
    Definition Classes
    LogicalPlan → TreeNode
  137. val viewType: ViewType
  138. final def withNewChildren(newChildren: Seq[LogicalPlan]): LogicalPlan
    Definition Classes
    TreeNode