@Evolving public interface StagedTable extends Table
This is used to implement atomic CREATE TABLE AS SELECT and REPLACE TABLE AS SELECT queries. The
planner will create one of these via
StagingTableCatalog.stageCreate(Identifier, StructType, Transform[], Map)
or
StagingTableCatalog.stageReplace(Identifier, StructType, Transform[], Map)
to prepare the
table for being written to. This table should usually implement SupportsWrite
. A new
writer will be constructed via SupportsWrite.newWriteBuilder(LogicalWriteInfo)
, and the
write will be committed. The job concludes with a call to commitStagedChanges()
, at
which point implementations are expected to commit the table's metadata into the metastore along
with the data that was written by the writes from the write builder this table created.
Modifier and Type | Method and Description |
---|---|
void |
abortStagedChanges()
Abort the changes that were staged, both in metadata and from temporary outputs of this
table's writers.
|
void |
commitStagedChanges()
Finalize the creation or replacement of this table.
|
capabilities, columns, name, partitioning, properties, schema