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

feat(spanner/spansql): add support for protobuf column types & Proto bundles #10945

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dfinkel
Copy link
Contributor

@dfinkel dfinkel commented Oct 2, 2024

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

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.
@dfinkel dfinkel requested review from a team as code owners October 2, 2024 14:17
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Oct 2, 2024
Add support for parsing and serializing CREATE, ALTER and DROP PROTO
BUNDLE DDL statements.
@dfinkel dfinkel force-pushed the spansql_protobuf_column_support branch from 8e788c3 to 0c841d8 Compare October 2, 2024 14:21
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spanner/spansql: support for Protobuf column-types
1 participant