cloudspannerecosystem / wrench

wrench - Schema management tool for Cloud Spanner -
MIT License
238 stars 47 forks source link

Proposal: Implement statement separator without spansql to fix parse errors #83

Open apstndb opened 1 year ago

apstndb commented 1 year ago

WHAT

There is a motivation to replace spansql with a more primitive implementation. I want to discuss it.

WHY

Currently, wrench can't process statements which are not supported by spansql because of the spansql dependency.

spansql is used in ddlToStatements, dmlToStatements. https://github.com/cloudspannerecosystem/wrench/blob/v1.4.1/pkg/spanner/migration.go#L144-L170

spansql is not actively maintained by Google and not 100% compatible with Cloud Spanner DDL/DML so the dependency on spansql makes it complex for wrench to support the new features of Cloud Spanner.

Reference