ShowCreateTableExec Physical Command¶
ShowCreateTableExec
is a V2CommandExec physical command that represents ShowCreateTable logical operator at execution.
ShowCreateTableExec
is a LeafExecNode
.
Creating Instance¶
ShowCreateTableExec
takes the following to be created:
ShowCreateTableExec
is created when:
- DataSourceV2Strategy execution planning strategy is executed (to plan a logical query plan with a ShowCreateTable logical operator)
Executing Command¶
run
showCreateTable.
showCreateTable¶
showCreateTable(
table: Table,
builder: StringBuilder): Unit
showCreateTable
adds the following (to the given StringBuilder
):
CREATE TABLE [tableName]
showCreateTable
then does the following:
- showTableDataColumns
- showTableUsing
- showTableOptions
- showTablePartitioning
- showTableComment
- showTableLocation
- showTableProperties
showTableDataColumns¶
showTableDataColumns(
table: Table,
builder: StringBuilder): Unit
showTableDataColumns
requests the given Table for the columns that are converted to DDL format.
showTablePartitioning¶
showTablePartitioning(
table: Table,
builder: StringBuilder): Unit
Noop for a non-partitioned table
showTablePartitioning
does nothing (noop) when the given table has no partitioning.
For a BucketTransform
(among partitioning transforms), showTablePartitioning
creates a BucketSpec to add the following (to the given StringBuilder
):
CLUSTERED BY [bucketColumnNames]
SORTED BY [sortColumnNames]
INTO [numBuckets] BUCKETS
One BucketTransform Supported
In case there are more BucketTransform
s, the last wins.
For all other Transforms, showTablePartitioning
requests them to describe and adds the following (to the given StringBuilder
):
PARTITIONED BY [transforms]