关注 spark技术分享,
撸spark源码 玩spark最佳实践

ShowCreateTableCommand

ShowCreateTableCommand Logical Command

ShowCreateTableCommand is a logical command that executes a SHOW CREATE TABLE SQL statement (with a data source / non-Hive or a Hive table).

ShowCreateTableCommand is created when SparkSqlAstBuilder is requested to parse SHOW CREATE TABLE SQL statement.

ShowCreateTableCommand uses a single createtab_stmt column (of type StringType) for the output schema.

ShowCreateTableCommand takes a single TableIdentifier when created.

Executing Logical Command — run Method

Note
run is part of RunnableCommand Contract to execute (run) a logical command.

run requests the SparkSession for the SessionState that is used to access the SessionCatalog.

run then showCreateDataSourceTable for a data source / non-Hive table or showCreateHiveTable for a Hive table (per the table metadata).

In the end, run returns the CREATE TABLE statement in a single Row.

showHiveTableNonDataColumns Internal Method

showHiveTableNonDataColumns…​FIXME

Note
showHiveTableNonDataColumns is used exclusively when ShowCreateTableCommand logical command is requested to showCreateHiveTable.

showCreateHiveTable Internal Method

showCreateHiveTable…​FIXME

Note
showCreateHiveTable is used exclusively when ShowCreateTableCommand logical command is executed (with a Hive table).

showHiveTableHeader Internal Method

showHiveTableHeader…​FIXME

Note
showHiveTableHeader is used exclusively when ShowCreateTableCommand logical command is requested to showCreateHiveTable.
赞(0) 打赏
未经允许不得转载:spark技术分享 » ShowCreateTableCommand
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏