TableCatalog¶
TableCatalog
is an extension of the CatalogPlugin abstraction for table catalogs.
Contract¶
Alter Table¶
Table alterTable(
Identifier ident,
TableChange... changes)
Changes (alters) a table based on the given TableChanges
Used when:
- AlterTableExec physical command is executed
DelegatingCatalogExtension
is requested to alterTable
Create Table¶
Table createTable(
Identifier ident,
Column[] columns,
Transform[] partitions,
Map<String, String> properties)
See:
Used when the following commands are executed:
CreateTableExec
ReplaceTableExec
- CreateTableAsSelectExec
ReplaceTableAsSelectExec
Drop Table¶
boolean dropTable(
Identifier ident)
Used when the following commands are executed:
DropTableExec
ReplaceTableExec
- CreateTableAsSelectExec
ReplaceTableAsSelectExec
List Tables¶
Identifier[] listTables(
String[] namespace)
Used when:
DelegatingCatalogExtension
is requested to listTables- ShowTablesExec is executed
Load Table¶
Table loadTable(
Identifier ident)
Table loadTable(
Identifier ident,
long timestamp)
Table loadTable(
Identifier ident,
Set<TableWritePrivilege> writePrivileges) // (1)!
Table loadTable(
Identifier ident,
String version)
- Added in 3.5.3
Used when:
CatalogV2Util
is requested to load a tableDataFrameWriter
is requested to insertInto, saveInternal, saveAsTableAtomicCreateTableAsSelectExec
physical operator is executedAtomicReplaceTableAsSelectExec
physical operator is executed- CreateTableAsSelectExec physical operator is executed
ReplaceTableAsSelectExec
physical operator is executedDelegatingCatalogExtension
is requested to load a tableRenameTableExec
physical operator is executedAtomicReplaceTableExec
physical operator is executedReplaceTableExec
physical operator is executedV2SessionCatalog
is requested to dropTableInternal, loadTable, dropTable, renameTableDataStreamWriter
is requested totoTable
Rename Table¶
void renameTable(
Identifier oldIdent,
Identifier newIdent)
Used when the following commands are executed:
RenameTableExec
Table Exists¶
boolean tableExists(
Identifier ident)
Used when:
- The following commands are executed:
AtomicCreateTableAsSelectExec
AtomicReplaceTableAsSelectExec
AtomicReplaceTableExec
- CreateTableAsSelectExec
CreateTableExec
DropTableExec
ReplaceTableAsSelectExec
-
ReplaceTableExec
-
V2SessionCatalog
is requested to renameTable