cloudspannerecosystem / memefish

memefish is the foundation to analyze Spanner SQL
https://cloudspannerecosystem.dev/memefish/
MIT License
76 stars 19 forks source link

Incompatibilities: ALTER COLUMN with generated columns is not supported #95

Open apstndb opened 2 months ago

apstndb commented 2 months ago

This incompatibility is detected by #90.

Spec

It is not explicitly written in DDL reference, but it is supported with/without NOT NULL. https://cloud.google.com/spanner/docs/generated-column/how-to#modify-generated-column

Reproducing input

ALTER TABLE T ALTER COLUMN expr INT64 NOT NULL AS (1) STORED;

Current error

syntax error:testdata/generated_column.test:6:48: expected token: <eof>, but: AS

  6:  ALTER TABLE T ALTER COLUMN expr INT64 NOT NULL AS (1) STORED;
                                                     ^~