GoogleCloudPlatform / cloud-spanner-emulator

An open source emulator for Cloud Spanner.
Apache License 2.0
273 stars 45 forks source link

Unsupported Spanner DDL statement: CREATE SEQUENCE #140

Closed credmond-git closed 9 months ago

credmond-git commented 1 year ago

Hi! It seems like CREATE SEQUENCE function is not supported by the emulator with version 1.5.11. Related to issue https://github.com/GoogleCloudPlatform/cloud-spanner-emulator/issues/135

How to reproduce

Run emulator: docker run -p 9010:9010 -p 9020:9020 gcr.io/cloud-spanner-emulator/emulator:1.5.11

With the DDL: CREATE SEQUENCE project_id_sequence OPTIONS (sequence_kind = 'bit_reversed_positive');

Run Flyway migrations then i get the error

INVALID_ARGUMENT: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Error parsing Spanner DDL statement: CREATE SEQUENCE project_id_sequence OPTIONS (sequence_kind = 'bit_reversed_positive') : Syntax error on line 1, column 8: Encountered 'SEQUENCE' while parsing: create_statement

olavloite commented 1 year ago

This is a known feature gap that is being worked on. We expect to ship this by the end of this year.

vishwanath-mathapati-scope commented 9 months ago

@olavloite Is the fix done on 1.5.13?

olavloite commented 9 months ago

@olavloite Is the fix done on 1.5.13?

No, it has been added in 1.5.14, which is the latest release (last week).

vishwanath-mathapati-scope commented 9 months ago

@olavloite Thanks, I can see its working on 1.5.14