Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility: ALTER COLUMN DROP DEFAULT #92

Closed
apstndb opened this issue Sep 12, 2024 · 0 comments · Fixed by #166
Closed

Incompatibility: ALTER COLUMN DROP DEFAULT #92

apstndb opened this issue Sep 12, 2024 · 0 comments · Fixed by #166

Comments

@apstndb
Copy link
Contributor

apstndb commented Sep 12, 2024

This incompatibility is detected by #90.

Spec

https://cloud.google.com/spanner/docs/reference/standard-sql/data-definition-language#alter_table

ALTER TABLE table_name
    action

where action is:
...
    ALTER [ COLUMN ] column_name
      {
        data_type  [ NOT NULL ] [ DEFAULT ( expression ) ]
        | SET OPTIONS ( options_def )
        | SET DEFAULT ( expression )
        | DROP DEFAULT
      }
...

Reproducing input

ALTER TABLE T ALTER COLUMN expr DROP DEFAULT;"

Current behavior

syntax error:testdata/column_default_values.test:6:33: expect ident: BOOL, INT64, FLOAT32, FLOAT64, DATE, TIMESTAMP, NUMERIC, JSON, STRING, BYTES, but: DROP

  6:  ALTER TABLE T ALTER COLUMN expr DROP DEFAULT;
                                      ^~~~
@apstndb apstndb changed the title Inconpatibility: ALTER COLUMN DROP DEFAULT Incompatibility: ALTER COLUMN DROP DEFAULT Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant