cloudspannerecosystem/memefish

Add trailing comma support

apstndb opened this issue · 0 comments

SELECT 1, 2,

is valid in Cloud Spanner now.

$ gcloud spanner databases execute-sql database --sql='SELECT 1, 2,'
(Unspecified)  (Unspecified)
1              2

memefish doesn't support trailing comma so it should be supported.

$ go run ./tools/parse 'SELECT 1, 2,'
2020/03/08 18:23:50 syntax error::1:13: unexpected token: <eof>

  1:  SELECT 1, 2,
                  ^
exit status 1