You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(spanner/spansql): PROTO BUNDLE and protobuf type parsing fixes (#11279)
* fix: spansql: fix NOT NULL protobuf column type parsing
The protobuf type-name parser was so greedy that it failed on NOT NULL
columns. In particular, it wasn't aware that unquoted tokens should be
separated by dots, and that quoted tokens shouldn't be concatenated with
anything else.
Fix this by adding a boolean to handle that alternation and only
allowing quoted IDs if nothing else has been consumed. (then bailing
immediately after a quoted ID so we don't try to consume anything
else)
* fix: spansql: fix invalid CAST tests
A misreading of the spanner docs lead to tests that indicated that
casting `AS ENUM` or `AS PROTO` was valid syntax (despite not specifying
_which_ protobuf enum or message type to cast to). Replace these cases
with ones that validate casting to specific enum/message types.
Thanks to @apstndb for calling this out on #10945.
* fix spansql: CREATE PROTO BUNDLE SQL with 0 types
Fix a bug in CreateProtoBundle.SQL() which unintentionally generated the
DDL when there were no types listed:
```
CREATE PROTO BUNDLE (``)
```
---------
Co-authored-by: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com>
0 commit comments