-
-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BigQuery: Allow keywords in column reference components (#1987)
* BigQuery allow keywords in column reference components * Better comments
- Loading branch information
1 parent
3bca62f
commit d145358
Showing
3 changed files
with
108 additions
and
1 deletion.
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
7 changes: 7 additions & 0 deletions
7
test/fixtures/dialects/bigquery/select_column_object_with_keyword.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- current is a reserved word but keywords are allowed as part of a nested object name | ||
SELECT | ||
table1.current.column, | ||
table1.object.current.column, | ||
table1.object.nested.current.column, | ||
FROM | ||
table1 |
48 changes: 48 additions & 0 deletions
48
test/fixtures/dialects/bigquery/select_column_object_with_keyword.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# YML test files are auto-generated from SQL files and should not be edited by | ||
# hand. To help enforce this, the "hash" field in the file must match a hash | ||
# computed by SQLFluff when running the tests. Please run | ||
# `python test/generate_parse_fixture_yml.py` to generate them after adding or | ||
# altering SQL files. | ||
_hash: e9b7b38575826b8cc463734bcc7647038a51e5b8342f3c2dd6624b233bae30d8 | ||
file: | ||
statement: | ||
select_statement: | ||
select_clause: | ||
- keyword: SELECT | ||
- select_clause_element: | ||
column_reference: | ||
- identifier: table1 | ||
- dot: . | ||
- identifier: current | ||
- dot: . | ||
- identifier: column | ||
- comma: ',' | ||
- select_clause_element: | ||
column_reference: | ||
- identifier: table1 | ||
- dot: . | ||
- identifier: object | ||
- dot: . | ||
- identifier: current | ||
- dot: . | ||
- identifier: column | ||
- comma: ',' | ||
- select_clause_element: | ||
column_reference: | ||
- identifier: table1 | ||
- dot: . | ||
- identifier: object | ||
- dot: . | ||
- identifier: nested | ||
- dot: . | ||
- identifier: current | ||
- dot: . | ||
- identifier: column | ||
- comma: ',' | ||
from_clause: | ||
keyword: FROM | ||
from_expression: | ||
from_expression_element: | ||
table_expression: | ||
table_reference: | ||
identifier: table1 |