AlterTableCommand¶
AlterTableCommand is an extension of the Command abstraction for unary logical commands to alter a table.
Contract¶
TableChanges¶
changes: Seq[TableChange]
TableChanges to apply to the table
Used when:
- DataSourceV2Strategy execution planning strategy is executed (to plan an
AlterTableCommandto AlterTableExec)
Table¶
table: LogicalPlan
LogicalPlan of the table to alter
Used when:
ResolveAlterTableCommandsanalysis rule is executedAlterTableCommandis requested for the child- DataSourceV2Strategy execution planning strategy is executed (to plan an
AlterTableCommandto AlterTableExec)
Implementations¶
AddColumnsAlterColumnCommentOnTableDropColumns- RenameColumn
ReplaceColumnsSetTableLocationSetTablePropertiesUnsetTableProperties
RenameColumn¶
| AlterTableCommand | TableChange | SQL |
|---|---|---|
RenameColumn | RenameColumn | ALTER TABLE RENAME COLUMN |
Execution Planning¶
AlterTableCommands are planned as AlterTableExecs (by DataSourceV2Strategy execution planning strategy).