sqlglot
sqlglot copied to clipboard
feat!: Add ALTER TABLE SET
Introduce support for ALTER TABLE ... SET ... across first class dialects.
Design notes:
- Create an
exp.AlterSetnode belonging inALTER_PARSERSthat will hold the arguments across all mentioned dialects - Create
exp.DataDeletionPropertyto parse T-SQL'sDATA_DELETIONargument - Modify
exp.WithSystemVersioningPropertyandexp.SerdePropertiesto optionally include theWITHkeyword as a boolean arg - Utilize
parse_propertiesas a catch-all since many options are parsed as such already & to parse simple statements likeALTER TABLE ... SET <opt> = <val>as "anonymous"exp.Propertywhich solves the need of more manual parsing
Docs
T-SQL | Postgres | Spark | Hive | Databricks | Snowflake | Redshift | BigQuery