CreateTable Logical Operator¶
CreateTable is a LogicalPlan.
CreateTable can never be resolved and is replaced with (resolved to) a logical command at analysis phase in the following rules:
(for non-hive data source tables) DataSourceAnalysis posthoc logical resolution rule to a CreateDataSourceTableCommand or a CreateDataSourceTableAsSelectCommand logical command (based on the query defined or not, respectively)
CreateTable takes the following to be created:
While being created,
CreateTable asserts the following:
- The table to be created must have the provider
- With no query, the SaveMode must be either
CreateTable is created when:
- DataFrameWriter.saveAsTable operator is used (and creates a table)
- ResolveSessionCatalog logical resolution rule is executed (to constructV1TableCmd)
resolved is part of the LogicalPlan abstraction.
resolved is always