org.apache.spark.sql.catalyst.catalog

ExternalCatalog

abstract class ExternalCatalog extends AnyRef

Interface for the system catalog (of functions, partitions, tables, and databases).

This is only used for non-temporary items, and implementations must be thread-safe as they can be accessed in multiple threads. This is an external catalog because it is expected to interact with external systems.

Implementations should throw NoSuchDatabaseException when databases don't exist.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ExternalCatalog
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ExternalCatalog()

Abstract Value Members

  1. abstract def alterDatabase(dbDefinition: CatalogDatabase): Unit

    Alter a database whose name matches the one specified in dbDefinition, assuming the database exists.

    Alter a database whose name matches the one specified in dbDefinition, assuming the database exists.

    Note: If the underlying implementation does not support altering a certain field, this becomes a no-op.

  2. abstract def alterPartitions(db: String, table: String, parts: Seq[CatalogTablePartition]): Unit

    Alter one or many table partitions whose specs that match those specified in parts, assuming the partitions exist.

    Alter one or many table partitions whose specs that match those specified in parts, assuming the partitions exist.

    Note: If the underlying implementation does not support altering a certain field, this becomes a no-op.

  3. abstract def alterTable(tableDefinition: CatalogTable): Unit

    Alter a table whose database and name match the ones specified in tableDefinition, assuming the table exists.

    Alter a table whose database and name match the ones specified in tableDefinition, assuming the table exists. Note that, even though we can specify database in tableDefinition, it's used to identify the table, not to alter the table's database, which is not allowed.

    Note: If the underlying implementation does not support altering a certain field, this becomes a no-op.

  4. abstract def createDatabase(dbDefinition: CatalogDatabase, ignoreIfExists: Boolean): Unit

  5. abstract def createFunction(db: String, funcDefinition: CatalogFunction): Unit

  6. abstract def createPartitions(db: String, table: String, parts: Seq[CatalogTablePartition], ignoreIfExists: Boolean): Unit

  7. abstract def createTable(tableDefinition: CatalogTable, ignoreIfExists: Boolean): Unit

  8. abstract def databaseExists(db: String): Boolean

  9. abstract def dropDatabase(db: String, ignoreIfNotExists: Boolean, cascade: Boolean): Unit

  10. abstract def dropFunction(db: String, funcName: String): Unit

  11. abstract def dropPartitions(db: String, table: String, parts: Seq[TablePartitionSpec], ignoreIfNotExists: Boolean, purge: Boolean, retainData: Boolean): Unit

  12. abstract def dropTable(db: String, table: String, ignoreIfNotExists: Boolean, purge: Boolean): Unit

  13. abstract def functionExists(db: String, funcName: String): Boolean

  14. abstract def getDatabase(db: String): CatalogDatabase

  15. abstract def getFunction(db: String, funcName: String): CatalogFunction

  16. abstract def getPartition(db: String, table: String, spec: TablePartitionSpec): CatalogTablePartition

  17. abstract def getPartitionOption(db: String, table: String, spec: TablePartitionSpec): Option[CatalogTablePartition]

    Returns the specified partition or None if it does not exist.

  18. abstract def getTable(db: String, table: String): CatalogTable

  19. abstract def getTableOption(db: String, table: String): Option[CatalogTable]

  20. abstract def listDatabases(pattern: String): Seq[String]

  21. abstract def listDatabases(): Seq[String]

  22. abstract def listFunctions(db: String, pattern: String): Seq[String]

  23. abstract def listPartitionNames(db: String, table: String, partialSpec: Option[TablePartitionSpec] = None): Seq[String]

    List the names of all partitions that belong to the specified table, assuming it exists.

    List the names of all partitions that belong to the specified table, assuming it exists.

    For a table with partition columns p1, p2, p3, each partition name is formatted as p1=v1/p2=v2/p3=v3. Each partition column name and value is an escaped path name, and can be decoded with the ExternalCatalogUtils.unescapePathName method.

    The returned sequence is sorted as strings.

    A partial partition spec may optionally be provided to filter the partitions returned, as described in the listPartitions method.

    db

    database name

    table

    table name

    partialSpec

    partition spec

  24. abstract def listPartitions(db: String, table: String, partialSpec: Option[TablePartitionSpec] = None): Seq[CatalogTablePartition]

    List the metadata of all partitions that belong to the specified table, assuming it exists.

    List the metadata of all partitions that belong to the specified table, assuming it exists.

    A partial partition spec may optionally be provided to filter the partitions returned. For instance, if there exist partitions (a='1', b='2'), (a='1', b='3') and (a='2', b='4'), then a partial spec of (a='1') will return the first two only.

    db

    database name

    table

    table name

    partialSpec

    partition spec

  25. abstract def listPartitionsByFilter(db: String, table: String, predicates: Seq[Expression]): Seq[CatalogTablePartition]

    List the metadata of partitions that belong to the specified table, assuming it exists, that satisfy the given partition-pruning predicate expressions.

    List the metadata of partitions that belong to the specified table, assuming it exists, that satisfy the given partition-pruning predicate expressions.

    db

    database name

    table

    table name

    predicates

    partition-pruning predicates

  26. abstract def listTables(db: String, pattern: String): Seq[String]

  27. abstract def listTables(db: String): Seq[String]

  28. abstract def loadDynamicPartitions(db: String, table: String, loadPath: String, partition: TablePartitionSpec, replace: Boolean, numDP: Int, holdDDLTime: Boolean): Unit

  29. abstract def loadPartition(db: String, table: String, loadPath: String, partition: TablePartitionSpec, isOverwrite: Boolean, holdDDLTime: Boolean, inheritTableSpecs: Boolean): Unit

  30. abstract def loadTable(db: String, table: String, loadPath: String, isOverwrite: Boolean, holdDDLTime: Boolean): Unit

  31. abstract def renameFunction(db: String, oldName: String, newName: String): Unit

  32. abstract def renamePartitions(db: String, table: String, specs: Seq[TablePartitionSpec], newSpecs: Seq[TablePartitionSpec]): Unit

    Override the specs of one or many existing table partitions, assuming they exist.

    Override the specs of one or many existing table partitions, assuming they exist. This assumes index i of specs corresponds to index i of newSpecs.

  33. abstract def renameTable(db: String, oldName: String, newName: String): Unit

  34. abstract def setCurrentDatabase(db: String): Unit

  35. abstract def tableExists(db: String, table: String): Boolean

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  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
  16. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  17. def requireDbExists(db: String): Unit

    Attributes
    protected
  18. def requireFunctionExists(db: String, funcName: String): Unit

    Attributes
    protected
  19. def requireFunctionNotExists(db: String, funcName: String): Unit

    Attributes
    protected
  20. def requireTableExists(db: String, table: String): Unit

    Attributes
    protected
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  22. def toString(): String

    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped