trait ViewCatalog extends CatalogPlugin
Catalog methods for working with views.
- Annotations
- @DeveloperApi()
- Source
- ViewCatalog.java
- Alphabetic
- By Inheritance
- ViewCatalog
- CatalogPlugin
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def alterView(ident: Identifier, changes: <repeated...>[ViewChange]): View
Apply
changes
to a view in the catalog.Apply
changes
to a view in the catalog.Implementations may reject the requested changes. If any change is rejected, none of the changes should be applied to the view.
- ident
a view identifier
- changes
an array of changes to apply to the view
- returns
the view altered
- Exceptions thrown
IllegalArgumentException
If any change is rejected by the implementation.NoSuchViewException
If the view doesn't exist or is a table.
- abstract def createView(viewInfo: ViewInfo): View
Create a view in the catalog.
Create a view in the catalog.
- viewInfo
the info class holding all view information
- returns
the created view. This can be null if getting the metadata for the view is expensive
- Exceptions thrown
NoSuchNamespaceException
If the identifier namespace does not exist (optional)ViewAlreadyExistsException
If a view or table already exists for the identifier
- abstract def dropView(ident: Identifier): Boolean
Drop a view in the catalog.
Drop a view in the catalog.
If the catalog supports tables and contains a table for the identifier and not a view, this must not drop the table and must return false.
- ident
a view identifier
- returns
true if a view was deleted, false if no view exists for the identifier
- abstract def initialize(name: String, options: CaseInsensitiveStringMap): Unit
Called to initialize configuration.
Called to initialize configuration.
This method is called once, just after the provider is instantiated.
- name
the name used to identify and load this catalog
- options
a case-insensitive string map of configuration
- Definition Classes
- CatalogPlugin
- abstract def listViews(namespace: <repeated...>[String]): Array[Identifier]
List the views in a namespace from the catalog.
List the views in a namespace from the catalog.
If the catalog supports tables, this must return identifiers for only views and not tables.
- namespace
a multi-part namespace
- returns
an array of Identifiers for views
- Exceptions thrown
NoSuchNamespaceException
If the namespace does not exist (optional).
- abstract def loadView(ident: Identifier): View
Load view metadata by
ident
from the catalog.Load view metadata by
ident
from the catalog.If the catalog supports tables and contains a table for the identifier and not a view, this must throw
NoSuchViewException
.- ident
a view identifier
- returns
the view description
- Exceptions thrown
NoSuchViewException
If the view doesn't exist or is a table
- abstract def name(): String
Called to get this catalog's name.
Called to get this catalog's name.
This method is only called after
CaseInsensitiveStringMap)
is called to pass the catalog's name.- Definition Classes
- CatalogPlugin
- abstract def renameView(oldIdent: Identifier, newIdent: Identifier): Unit
Rename a view in the catalog.
Rename a view in the catalog.
If the catalog supports tables and contains a table with the old identifier, this throws
NoSuchViewException
. Additionally, if it contains a table with the new identifier, this throwsViewAlreadyExistsException
.If the catalog does not support view renames between namespaces, it throws
UnsupportedOperationException
.- oldIdent
the view identifier of the existing view to rename
- newIdent
the new view identifier of the view
- Exceptions thrown
NoSuchViewException
If the view to rename doesn't exist or is a tableUnsupportedOperationException
If the namespaces of old and new identifiers do not match (optional)ViewAlreadyExistsException
If the new view name already exists or is a table
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def defaultNamespace(): Array[String]
Return a default namespace for the catalog.
Return a default namespace for the catalog.
When this catalog is set as the current catalog, the namespace returned by this method will be set as the current namespace.
The namespace returned by this method is not required to exist.
- returns
a multi-part namespace
- Definition Classes
- CatalogPlugin
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def invalidateView(ident: Identifier): Unit
Invalidate cached view metadata for an
identifier
.Invalidate cached view metadata for an
identifier
.If the view is already loaded or cached, drop cached data. If the view does not exist or is not cached, do nothing. Calling this method should not query remote services.
- ident
a view identifier
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def replaceView(viewInfo: ViewInfo, orCreate: Boolean): View
Replace a view in the catalog.
Replace a view in the catalog.
The default implementation has a race condition. Catalogs are encouraged to implement this operation atomically.
- viewInfo
the info class holding all view information
- orCreate
create the view if it doesn't exist
- returns
the created/replaced view. This can be null if getting the metadata for the view is expensive
- Exceptions thrown
NoSuchNamespaceException
If the identifier namespace does not exist (optional)NoSuchViewException
If the view doesn't exist or is a table
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def viewExists(ident: Identifier): Boolean
Test whether a view exists using an
identifier
from the catalog.Test whether a view exists using an
identifier
from the catalog.If the catalog supports views and contains a view for the identifier and not a table, this must return false.
- ident
a view identifier
- returns
true if the view exists, false otherwise
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)