Open naphatkrit opened 1 year ago
Just came here for the same issue. My current workaround is to filter out alter statements, but this is not very useful in the long run.
I have the same issue. Is there already a solution available?
~I'm also running into the same issue. We depend on the emulator for integration testing so it looks like I'll just have to create a new index with the alterations and delete the old one later which is pretty inefficient. It would be really nice if the emulator aligned with the spec here. Related Spanner DDL docs for reference.~
Looks like support was added in https://github.com/GoogleCloudPlatform/cloud-spanner-emulator/releases/tag/v1.5.13 so might just need to upgrade!
Using 1.5.22
com.google.cloud.spanner.SpannerException: UNIMPLEMENTED: io.grpc.StatusRuntimeException: UNIMPLEMENTED: Cannot add NOT NULL column _index_data_table_<indexname>.<stored column name> to existing table _index_data_table<indexname>.
Edit: DROP STORED COLUMN works, adding does not.
Spanner DDL spec supports
ALTER INDEX
statements, such as,ALTER INDEX MyIndex DROP STORED COLUMN MyColumn;
. Running this against the emulator results in an error:Running this same DDL statement on a real spanner instance worked fine.
I am on emulator version 1.5.9.