Description
Is your feature request related to a problem? Please describe.
It seems that spansql package which is used in Spanner support is not actively developed.
googleapis/google-cloud-go#11115
Many of the issues opened due to spansql's lack of support for Spanner SQL syntax.
- Support Default on Google Cloud Spanner #918
- Dropping spanner tables which has row deletion policy #844
- spanner CHANGE STREAM #775
- Module update needed (Cloud Spanner parsing issue) #767
- JSON field type rejected #710
(Although I think some issues are already resolved in latest spansql.)
Describe the solution you'd like
Migrating to another Spanner SQL parser implementation is a solution.
I recommend to consider cloudspannerecosystem/memefish.
Whose Spanner SQL coverage is already superset of spansql.
Describe alternatives you've considered
Current usage of spansql is only splitting DDL statements and strip comments.
migrate/database/spanner/spanner.go
Lines 343 to 347 in c378583
I think it can be implemented without full syntax parsing using only a lexer.