CreateDataSourceTableCommand Logical Command
CreateDataSourceTableCommand is a logical command that creates a new table (in a session-scoped SessionCatalog).
CreateDataSourceTableCommand is created exclusively when DataSourceAnalysis posthoc logical resolution rule resolves a CreateTable logical operator for a non-Hive table provider with no query.
CreateDataSourceTableCommand takes a table metadata and ignoreIfExists flag.
Executing Logical Command — run Method
|
1 2 3 4 5 |
run(sparkSession: SparkSession): Seq[Row] |
|
Note
|
run is part of RunnableCommand Contract to execute (run) a logical command.
|
run creates a new table in a session-scoped SessionCatalog.
|
Note
|
run uses the input SparkSession to access SessionState that in turn is used to access the current SessionCatalog.
|
Internally, run creates a BaseRelation to access the table’s schema.
|
Caution
|
FIXME |
|
Note
|
run accepts tables only (not views) with the provider defined.
|
spark技术分享