CreateDataSourceTableAsSelectCommand Logical Command¶
CreateDataSourceTableAsSelectCommand
is a LeafRunnableCommand that creates a DataSource table with the data (from a AS query).
Note
A DataSource table is a Spark SQL native table that uses any data source but Hive (per USING
clause).
CreateDataSourceTableCommand Logical Operator
CreateDataSourceTableCommand is used instead for CreateTable logical operators with no AS query.
Creating Instance¶
CreateDataSourceTableAsSelectCommand
takes the following to be created:
- CatalogTable
- SaveMode
-
AS
query (LogicalPlan) - Output Column Names
CreateDataSourceTableAsSelectCommand
is created when:
- DataSourceAnalysis post-hoc logical resolution rule is executed (to resolve CreateTable logical operators with a datasource table)
Executing Command¶
RunnableCommand
run(
sparkSession: SparkSession): Seq[Row]
run
is part of the RunnableCommand abstraction.
run
...FIXME