Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spanner/spansql: support for Protobuf column-types #10944

Closed
dfinkel opened this issue Oct 2, 2024 · 2 comments · Fixed by #10945
Closed

spanner/spansql: support for Protobuf column-types #10944

dfinkel opened this issue Oct 2, 2024 · 2 comments · Fixed by #10945
Assignees
Labels
api: spanner Issues related to the Spanner API. triage me I really want to be triaged.

Comments

@dfinkel
Copy link
Contributor

dfinkel commented Oct 2, 2024

Client

Spanner

Environment

any

Code

I'll open a PR shortly adding support to the spansql package for parsing/canonicalizing protobuf types, and adding support for CREATE/ALTER/DROP PROTO BUNDLE statements.

@dfinkel dfinkel added the triage me I really want to be triaged. label Oct 2, 2024
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Oct 2, 2024
@dfinkel
Copy link
Contributor Author

dfinkel commented Oct 2, 2024

I've filed #10945 to cover this.

(As usual) I'm open to revisions/feedback.
I mostly tried to follow the local style, but probably deviated in a few places.

@dfinkel
Copy link
Contributor Author

dfinkel commented Oct 31, 2024

The review on #10945 seems to have gone silent after I fixed a bug from a bad rebase/merge conflict.
Would it be possible for someone to make another pass over that PR?
Thanks!

gcf-merge-on-green bot pushed a commit that referenced this issue Nov 6, 2024
…bundles (#10945)

### feat(spansql): CREATE/ALTER/DROP PROTO BUNDLE
    
Add support for parsing and serializing CREATE, ALTER and DROP PROTO
BUNDLE DDL statements.


### feat(spanner/spansql): support for protobuf types
    
Now that Spanner supports protobuf message and enum-typed columns and
casts, add support for parsing those those types.
    
Since protobuf columns aren't distinguished by a keyword, adjust the
parser to see any unquoted identifier that's not a known type as a
possible protobuf type and loop, consuming `.`s and identifiers until it
hits a non-ident/`.` token. (to match the proto namespace components up
through the message or enum names)
    
To track the fully-qualified message/enum type-name add an additional
field to the `Type` struct (tentatively) called `ProtoRef` so we can
recover the message/enum name if canonicalizing everything.

closes: #10944
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. triage me I really want to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants