-
Notifications
You must be signed in to change notification settings - Fork 551
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for BigQuery struct and array datatype
This builds on top of #817 - `STRUCT` literal support via `STRUCT` keyword https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#constructing_a_struct - `STRUCT` and `ARRAY` type declarations https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#declaring_an_array_type https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#declaring_a_struct_type It works around the issue of not being able to parse nested types like `ARRAY<ARRAY<INT>>` due to the right angle bracket ambiguity where the tokenizer chooses the right-shift operator (this affects other dialects like Hive that have similar syntax). When parsing such types, we accept a closing `>` or `>>` and track which variant is in use in order to preserve correctness. Fixes #901 Closes #817
- Loading branch information
Showing
8 changed files
with
894 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.