sqlglot icon indicating copy to clipboard operation
sqlglot copied to clipboard

feat!: Add ALTER TABLE SET

Open VaggelisD opened this issue 1 year ago • 0 comments

Introduce support for ALTER TABLE ... SET ... across first class dialects.

Design notes:

  • Create an exp.AlterSet node belonging in ALTER_PARSERS that will hold the arguments across all mentioned dialects
  • Create exp.DataDeletionProperty to parse T-SQL's DATA_DELETION argument
  • Modify exp.WithSystemVersioningProperty and exp.SerdeProperties to optionally include the WITH keyword as a boolean arg
  • Utilize parse_properties as a catch-all since many options are parsed as such already & to parse simple statements like ALTER TABLE ... SET <opt> = <val> as "anonymous" exp.Property which solves the need of more manual parsing

Docs

T-SQL | Postgres | Spark | Hive | Databricks | Snowflake | Redshift | BigQuery

VaggelisD avatar May 15 '24 14:05 VaggelisD