Packages

class View extends Relation

A view in a catalog -- the typed payload returned by ViewCatalog#loadView and accepted by ViewCatalog#createView / ViewCatalog#replaceView. A View carries the view-specific fields that cannot be represented as string table properties: the query text, captured creation-time resolution context, captured SQL configs, schema-binding mode, and query output column names. Columns and user TBLPROPERTIES are set via the typed builder.

Unlike a Table, a View is itself a Relation rather than something Spark realizes into a Table: Spark expands the view's query text at read time and never builds a view object. A RelationCatalog returns a View directly from RelationCatalog#loadRelation for a view identifier, so it never has to smuggle a view through the Table surface.

Annotations
@Evolving()
Source
View.java
Since

4.2.0

Linear Supertypes
Relation, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. View
  2. Relation
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new View(builder: Builder)
    Attributes
    protected[catalog]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. def columns(): Array[Column]

    The columns of this relation.

    The columns of this relation.

    Definition Classes
    ViewRelation
    Annotations
    @Override()
  7. def currentCatalog(): String

    The current catalog at the time the view was created, used to resolve unqualified identifiers in #queryText() at read time.

    The current catalog at the time the view was created, used to resolve unqualified identifiers in #queryText() at read time. May be null if the view was created with no captured resolution context.

  8. def currentNamespace(): Array[String]

    The current namespace at the time the view was created, used alongside #currentCatalog() to resolve unqualified identifiers in #queryText() at read time.

    The current namespace at the time the view was created, used alongside #currentCatalog() to resolve unqualified identifiers in #queryText() at read time. Never null; empty when no namespace was captured.

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  17. def properties(): Map[String, String]

    The string map of properties of this relation.

    The string map of properties of this relation.

    Definition Classes
    ViewRelation
    Annotations
    @Override()
  18. def queryColumnNames(): Array[String]

    Output column names of the query that created the view, used to map the query output to the view's declared columns during view resolution.

    Output column names of the query that created the view, used to map the query output to the view's declared columns during view resolution. Empty for views in EVOLUTION mode, which always use the view's current schema.

  19. def queryText(): String

    The SQL text of the view.

  20. def schema(): StructType
  21. def schemaMode(): String

    The view's schema binding mode.

    The view's schema binding mode. Allowed values match the toString form of org.apache.spark.sql.catalyst.analysis.ViewSchemaMode: BINDING, COMPENSATION, TYPE EVOLUTION, EVOLUTION. May be null when schema binding is not configured.

  22. def sqlConfigs(): Map[String, String]

    The SQL configs captured at view creation time, applied when parsing and analyzing the view body.

    The SQL configs captured at view creation time, applied when parsing and analyzing the view body. Keys are unprefixed SQL config names (e.g. spark.sql.ansi.enabled).

  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. def viewDependencies(): DependencyList

    Returns the structured list of objects this view depends on (source tables and functions), or null if no dependency list was supplied.

    Returns the structured list of objects this view depends on (source tables and functions), or null if no dependency list was supplied. Unlike other view metadata which is encoded into #properties(), dependency lists are a first-class field because their nested structure does not round-trip cleanly through flat string properties.

  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Relation

Inherited from AnyRef

Inherited from Any

Ungrouped