ResolveSessionCatalog Logical Resolution Rule¶
ResolveSessionCatalog is a logical resolution rule (Rule[LogicalPlan]).
Creating Instance¶
ResolveSessionCatalog takes the following to be created:
- CatalogManager
- SQLConf
-
isTempViewFunction (Seq[String] => Boolean) -
isTempFunctionFunction (String => Boolean)
ResolveSessionCatalog is created as an extended resolution rule when HiveSessionStateBuilder and BaseSessionStateBuilder are requested for the analyzer.
Executing Rule¶
apply resolves the following logical operators:
- AddColumns
- CreateTable with the default session catalog (
spark_catalog) and the table provider not v2 - CreateTableAsSelect with the default session catalog (
spark_catalog) and the table provider not v2 - others
constructV1TableCmd¶
constructV1TableCmd(
query: Option[LogicalPlan],
tableSpec: TableSpecBase,
ident: TableIdentifier,
tableSchema: StructType,
partitioning: Seq[Transform],
ignoreIfExists: Boolean,
storageFormat: CatalogStorageFormat,
provider: String): CreateTable
constructV1TableCmd buildCatalogTable and creates a new CreateTable logical operator.
isV2Provider¶
isV2Provider(
provider: String): Boolean
isV2Provider looks up the DataSourceV2 implementation (the TableProvider) for the given provider.
provider
The provider name can be an alias (a short name) or a fully-qualified class name.
isV2Provider is true for all the connectors but FileDataSourceV2. Otherwise, isV2Provider is false.