pub struct AlterTable {
pub name: ObjectName,
pub if_exists: bool,
pub only: bool,
pub operations: Vec<AlterTableOperation>,
pub location: Option<HiveSetLocation>,
pub on_cluster: Option<Ident>,
pub table_type: Option<AlterTableType>,
pub end_token: AttachedToken,
}Expand description
ALTER TABLE statement
Table name
Whether IF EXISTS was specified for the ALTER TABLE.
Whether the ONLY keyword was used (restrict scope to the named table).
List of ALTER TABLE operations to apply.
Optional Hive SET LOCATION clause for the alter operation.
ClickHouse dialect supports ON CLUSTER clause for ALTER TABLE
For example: ALTER TABLE table_name ON CLUSTER cluster_name ADD COLUMN c UInt32
ClickHouse
Table type: None for regular tables, Some(AlterTableType) for Iceberg or Dynamic tables
Token that represents the end of the statement (semicolon or EOF)