Skip to content

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:

Table

table: LogicalPlan

LogicalPlan of the table to alter

Used when:

  • ResolveAlterTableCommands analysis rule is executed
  • AlterTableCommand is requested for the child
  • DataSourceV2Strategy execution planning strategy is executed (to plan an AlterTableCommand to AlterTableExec)

Implementations

  • AddColumns
  • AlterColumn
  • CommentOnTable
  • DropColumns
  • RenameColumn
  • ReplaceColumns
  • SetTableLocation
  • SetTableProperties
  • UnsetTableProperties

RenameColumn

AlterTableCommand TableChange SQL
RenameColumn RenameColumn ALTER TABLE RENAME COLUMN

Execution Planning

AlterTableCommands are planned as AlterTableExecs (by DataSourceV2Strategy execution planning strategy).