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: Empty column list in {CREATE | ALTER} CHANGE STREAM must be allowed #91

Open
apstndb opened this issue Sep 12, 2024 · 0 comments

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#create-change-stream

CREATE CHANGE STREAM change_stream_name
[ FOR { table_columns [, ... ] | ALL } ]
[ OPTIONS ( change_stream_option [, ... ] ) ]

where table_columns is:
    table_name [ ( [ column_name, ... ] ) ]

table_name ( [column_name, ... ] ): You can optionally specify a list of zero or more non-key columns following the table name. This watches only the primary key and the listed non-key columns of the table. With an empty list of non-key columns, table_name() watches only the primary key.

Reproducing input

CREATE CHANGE STREAM change_stream FOR Users();

Current behavior

syntax error:testdata/change_streams.test:6:46: expected token: <ident>, but: )

  6:  CREATE CHANGE STREAM change_stream FOR Users();
                                                   ^

Note: ALTER CHANGE STREAM also supports empty column lists

ALTER CHANGE STREAM change_stream_name
    action

where action is:
    { SET FOR { table_columns [, ... ] | ALL } |
      DROP FOR ALL |
      SET OPTIONS ( change_stream_option [, ... ] ) }

and table_columns is:
    table_name [ ( [ column_name, ... ] ) ]
@apstndb apstndb changed the title Incompatibilities: Empty column list in {CREATE | ALTER} CHANGE STREAM must be allowed Incompatibility: Empty column list in {CREATE | ALTER} CHANGE STREAM must be allowed Sep 13, 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

No branches or pull requests

1 participant