Skip to content

Commit

Permalink
BigQuery: Unreserve KEY keyword (sqlfluff#5703)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-finley authored Mar 21, 2024
1 parent 13a4381 commit b2a4eab
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/sqlfluff/dialects/dialect_bigquery_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
INTO
IS
JOIN
KEY
LATERAL
LEFT
LIKE
Expand Down Expand Up @@ -177,6 +176,7 @@
INOUT
INSERT
INTEGRATION
KEY
ITERATE
LANGUAGE
LARGE
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/dialects/bigquery/select.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT 'metadata' AS key from foo;
24 changes: 24 additions & 0 deletions test/fixtures/dialects/bigquery/select.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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: dee0a6c0271b2be54f6c70ff6062083e5b2d7842c80a81597715b6abb523d67c
file:
statement:
select_statement:
select_clause:
keyword: SELECT
select_clause_element:
quoted_literal: "'metadata'"
alias_expression:
keyword: AS
naked_identifier: key
from_clause:
keyword: from
from_expression:
from_expression_element:
table_expression:
table_reference:
naked_identifier: foo
statement_terminator: ;

0 comments on commit b2a4eab

Please sign in to comment.