ResolveCatalogs Logical Resolution Rule¶
ResolveCatalogs
is a logical rule (Rule[LogicalPlan]
).
ResolveCatalogs
is part of Resolution batch of Logical Analyzer.
Creating Instance¶
ResolveCatalogs
takes the following to be created:
ResolveCatalogs
is created when:
Analyzer
is requested for batches
Executing Rule¶
apply(
plan: LogicalPlan): LogicalPlan
apply
resolves catalogs from the multi-part identifiers in SQL statements and converts the following logical operators to the corresponding v2 commands if the resolved catalog is not the session catalog (aka spark_catalog).
ParsedStatement | Command |
---|---|
AlterTableAddColumnsStatement | AlterTable |
AlterTableAlterColumnStatement | AlterTable |
AlterTableRenameColumnStatement | AlterTable |
AlterTableDropColumnsStatement | AlterTable |
AlterTableSetPropertiesStatement | AlterTable |
AlterTableUnsetPropertiesStatement | AlterTable |
AlterTableSetLocationStatement | AlterTable |
AlterViewSetPropertiesStatement | throws a AnalysisException |
AlterViewUnsetPropertiesStatement | throws a AnalysisException |
RenameTableStatement | RenameTable |
DescribeColumnStatement | throws a AnalysisException |
CreateTableStatement | CreateV2Table |
CreateTableAsSelectStatement | CreateTableAsSelect |
RefreshTableStatement | RefreshTable |
ReplaceTableStatement | ReplaceTable |
ReplaceTableAsSelectStatement | ReplaceTableAsSelect |
DropTableStatement | DropTable |
DropViewStatement | throws a AnalysisException |
CreateNamespaceStatement | CreateNamespace |
UseStatement | SetCatalogAndNamespace |
ShowCurrentNamespaceStatement | ShowCurrentNamespace |
apply
is part of the Rule abstraction.