CatalogV2Util Utility¶
Loading Table¶
loadTable(
catalog: CatalogPlugin,
ident: Identifier,
timeTravelSpec: Option[TimeTravelSpec] = None): Option[Table]
loadTable
getTable.
loadTable
is used when:
- ResolveRelations logical analysis rule is executed (and lookupTableOrView and resolveRelation)
CatalogV2Util
is requested to loadRelationCatalogImpl
is requested to load a table
getTable¶
getTable(
catalog: CatalogPlugin,
ident: Identifier,
timeTravelSpec: Option[TimeTravelSpec] = None): Table
getTable
requests the given CatalogPlugin for the TableCatalog to loadTable.
getTable
is used when:
CatalogV2Util
is requested to loadTableDataSourceV2Utils
is requested to loadV2Source
getTableProviderCatalog¶
getTableProviderCatalog(
provider: SupportsCatalogOptions,
catalogManager: CatalogManager,
options: CaseInsensitiveStringMap): TableCatalog
getTableProviderCatalog
...FIXME
getTableProviderCatalog
is used when:
-
DataFrameReader
is requested to load (for a data source that is a [SupportsCatalogOptions]) -
DataFrameWriter
is requested to save (for a data source that is a [SupportsCatalogOptions])
Creating AlterTable Logical Command¶
createAlterTable(
originalNameParts: Seq[String],
catalog: CatalogPlugin,
tableName: Seq[String],
changes: Seq[TableChange]): AlterTable
createAlterTable
converts the CatalogPlugin to a TableCatalog.
createAlterTable
creates an AlterTable (with an UnresolvedV2Relation
).
createAlterTable
is used when:
- ResolveCatalogs and ResolveSessionCatalog logical resolution rules are executed (and resolve
AlterTableAddColumnsStatement
,AlterTableReplaceColumnsStatement
,AlterTableAlterColumnStatement
,AlterTableRenameColumnStatement
,AlterTableDropColumnsStatement
,AlterTableSetPropertiesStatement
,AlterTableUnsetPropertiesStatement
,AlterTableSetLocationStatement
operators)