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 typeless STRUCT syntax with field name #143

Closed
apstndb opened this issue Oct 19, 2024 · 1 comment
Closed

Support typeless STRUCT syntax with field name #143

apstndb opened this issue Oct 19, 2024 · 1 comment

Comments

@apstndb
Copy link
Contributor

apstndb commented Oct 19, 2024

https://cloud.google.com/spanner/docs/reference/standard-sql/data-types#typeless_struct_syntax

Typeless struct syntax

STRUCT( expr1 [AS field_name] [, ... ])
$ go run ./tools/parse --mode query 'SELECT TO_JSON(STRUCT(1 AS a, 'abc' AS b))' 
2024/10/19 17:34:25 syntax error: :1:25: expected token: ), but: AS

  1:  SELECT TO_JSON(STRUCT(1 AS a, abc AS b))
                              ^~
exit status 1

Related discussions

@apstndb apstndb changed the title Support typeless STRUCT syntax with field names Support typeless STRUCT syntax with field name Oct 19, 2024
This was referenced Oct 24, 2024
@apstndb
Copy link
Contributor Author

apstndb commented Nov 9, 2024

Already resolved via #183

@apstndb apstndb closed this as completed Nov 9, 2024
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

Successfully merging a pull request may close this issue.

1 participant