CatalogHelper¶
CatalogHelper is a Scala implicit class that adds extensions methods to CatalogPlugin.
Tip
Learn more on implicit classes in the official documentation of Scala 2.
Creating Instance¶
CatalogHelper takes the following to be created:
asNamespaceCatalog¶
asNamespaceCatalog returns the CatalogPlugin if it is a SupportsNamespaces or throws an AnalysisException otherwise:
asNamespaceCatalog is used when:
- ResolveCatalogs logical resolution rule is executed
- DataSourceV2Strategy execution planning strategy is executed
- DropNamespaceExec physical command is executed
asTableCatalog¶
asTableCatalog returns the CatalogPlugin if it is a TableCatalog or throws an AnalysisException otherwise:
asTableCatalog is used when:
ResolveTables, ResolveRelations, ResolveCatalogs and ResolveSessionCatalog logical resolution rules are executedCatalogV2Utilutility is used to load a table, createAlterTable and getTableProviderCatalogDataFrameWriteris requested to insertInto and saveAsTableDataFrameWriterV2is created- DataSourceV2Strategy execution planning strategy is executed
- DropNamespaceExec physical command is executed