Packages

t

org.apache.spark.sql.connector.catalog

SupportsNamespaces

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

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

Abstract Value Members

  1. 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

    NoSuchNamespaceException If the namespace does not exist (optional)

    UnsupportedOperationException If namespace properties are not supported

  2. 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

    NamespaceAlreadyExistsException If the namespace already exists

    UnsupportedOperationException If create is not a supported operation

  3. 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

    NoSuchNamespaceException If the namespace does not exist (optional)

    NonEmptyNamespaceException If the namespace is non-empty and cascade is false

    UnsupportedOperationException If drop is not a supported operation

  4. 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
  5. 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

    NoSuchNamespaceException If the namespace does not exist (optional)

  6. 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

  7. 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

    NoSuchNamespaceException If the namespace does not exist (optional)

    UnsupportedOperationException If namespace properties are not supported

  8. 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

  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 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
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. 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

  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  16. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  20. 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 CatalogPlugin

Inherited from AnyRef

Inherited from Any

Ungrouped