trait SupportsNamespaces extends CatalogPlugin
Catalog methods for working with namespaces.
If an object such as a table, view, or function exists, its parent namespaces must also exist
and must be returned by the discovery methods #listNamespaces() and
#listNamespaces(String[]).
Catalog implementations are not required to maintain the existence of namespaces independent of
objects in a namespace. For example, a function catalog that loads functions using reflection
and uses Java packages as namespaces is not required to support the methods to create, alter, or
drop a namespace. Implementations are allowed to discover the existence of objects or namespaces
without throwing NoSuchNamespaceException when no namespace is found.
- Annotations
- @Evolving()
- Source
- SupportsNamespaces.java
- Since
3.0.0
- Alphabetic
- By Inheritance
- SupportsNamespaces
- CatalogPlugin
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def alterNamespace(namespace: Array[String], changes: <repeated...>[NamespaceChange]): Unit
Apply a set of metadata changes to a namespace in the catalog.
Apply a set of metadata changes to a namespace in the catalog.
- namespace
a multi-part namespace
- changes
a collection of changes to apply to the namespace
- Exceptions thrown
NoSuchNamespaceExceptionIf the namespace does not exist (optional)UnsupportedOperationExceptionIf namespace properties are not supported
- abstract def createNamespace(namespace: Array[String], metadata: Map[String, String]): Unit
Create a namespace in the catalog.
Create a namespace in the catalog.
- namespace
a multi-part namespace
- metadata
a string map of properties for the given namespace
- Exceptions thrown
NamespaceAlreadyExistsExceptionIf the namespace already existsUnsupportedOperationExceptionIf create is not a supported operation
- abstract def dropNamespace(namespace: Array[String], cascade: Boolean): Boolean
Drop a namespace from the catalog with cascade mode, recursively dropping all objects within the namespace if cascade is true.
Drop a namespace from the catalog with cascade mode, recursively dropping all objects within the namespace if cascade is true.
If the catalog implementation does not support this operation, it may throw
UnsupportedOperationException.- namespace
a multi-part namespace
- cascade
When true, deletes all objects under the namespace
- returns
true if the namespace was dropped
- Exceptions thrown
NoSuchNamespaceExceptionIf the namespace does not exist (optional)NonEmptyNamespaceExceptionIf the namespace is non-empty and cascade is falseUnsupportedOperationExceptionIf drop is not a supported operation
- 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 listNamespaces(namespace: Array[String]): Array[Array[String]]
List namespaces in a namespace.
List namespaces in a namespace.
If an object such as a table, view, or function exists, its parent namespaces must also exist and must be returned by this discovery method. For example, if table a.b.t exists, this method invoked as listNamespaces(["a"]) must return ["a", "b"] in the result array.
- namespace
a multi-part namespace
- returns
an array of multi-part namespace names
- Exceptions thrown
NoSuchNamespaceExceptionIf the namespace does not exist (optional)
- abstract def listNamespaces(): Array[Array[String]]
List top-level namespaces from the catalog.
List top-level namespaces from the catalog.
If an object such as a table, view, or function exists, its parent namespaces must also exist and must be returned by this discovery method. For example, if table a.b.t exists, this method must return ["a"] in the result array.
- returns
an array of multi-part namespace names
- abstract def loadNamespaceMetadata(namespace: Array[String]): Map[String, String]
Load metadata properties for a namespace.
Load metadata properties for a namespace.
- namespace
a multi-part namespace
- returns
a string map of properties for the given namespace
- Exceptions thrown
NoSuchNamespaceExceptionIf the namespace does not exist (optional)UnsupportedOperationExceptionIf namespace properties are not supported
- 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
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()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def namespaceExists(namespace: Array[String]): Boolean
Test whether a namespace exists.
Test whether a namespace exists.
If an object such as a table, view, or function exists, its parent namespaces must also exist. For example, if table a.b.t exists, this method invoked as namespaceExists(["a"]) or namespaceExists(["a", "b"]) must return true.
- namespace
a multi-part namespace
- returns
true if the namespace exists, false otherwise
- 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()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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)