Skip to content

StagingTableCatalog

StagingTableCatalog is an extension of the TableCatalog abstraction for table catalogs that can stage Create, CreateOrReplace and Replace operations (for atomic CREATE TABLE AS SELECT and REPLACE TABLE and REPLACE TABLE AS SELECT queries).

  1. AtomicCreateTableAsSelectExec is created for CreateTableAsSelects on a StagingTableCatalog (otherwise, it is a CreateTableAsSelectExec)
  2. AtomicReplaceTableExec is created for ReplaceTables on a StagingTableCatalog (otherwise, it is a ReplaceTableExec)
  3. AtomicReplaceTableAsSelectExec is created for ReplaceTableAsSelects on a StagingTableCatalog (otherwise, it is a ReplaceTableAsSelectExec)

Contract

stageCreate

StagedTable stageCreate(
  Identifier ident,
  StructType schema,
  Transform[] partitions,
  Map<String, String> properties)

Creates a StagedTable

Used when:

  • AtomicCreateTableAsSelectExec unary physical command is executed

stageCreateOrReplace

StagedTable stageCreateOrReplace(
  Identifier ident,
  StructType schema,
  Transform[] partitions,
  Map<String, String> properties)

Creates a StagedTable

Used when:

  • AtomicReplaceTableExec leaf physical command is executed
  • AtomicReplaceTableAsSelectExec unary physical command is executed

stageReplace

StagedTable stageReplace(
  Identifier ident,
  StructType schema,
  Transform[] partitions,
  Map<String, String> properties)

Creates a StagedTable

Used when:

  • AtomicReplaceTableExec leaf physical command is executed
  • AtomicReplaceTableAsSelectExec unary physical command is executed

Implementations

Note

No known native Spark SQL implementations.