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

Support REPLACE_FIELDS #124

Open
apstndb opened this issue Oct 1, 2024 · 0 comments
Open

Support REPLACE_FIELDS #124

apstndb opened this issue Oct 1, 2024 · 0 comments

Comments

@apstndb
Copy link
Contributor

apstndb commented Oct 1, 2024

Protocol buffer function REPLACE_FIELDS can't be parsed as a normal function, so it is needed to be implemented as an ast.Expr.

Syntax

https://cloud.google.com/spanner/docs/reference/standard-sql/protocol_buffer_functions#replace_fields

REPLACE_FIELDS(proto_expression, value AS field_path [, ... ])

ZetaSQL Refs:

https://github.com/google/zetasql/blob/194cd32b5d766d60e3ca442651d792c7fe54ea74/zetasql/parser/bison_parser.y#L9206-L9233
https://github.com/google/zetasql/blob/194cd32b5d766d60e3ca442651d792c7fe54ea74/zetasql/parser/gen_parse_tree.py#L7103-L7135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant