-
-
Notifications
You must be signed in to change notification settings - Fork 750
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clickhouse: allow
FINAL
modifier (#3534)
* allow final modifier in clickhouse dialect * Update src/sqlfluff/dialects/dialect_clickhouse.py Co-authored-by: Barry Pollard <barrypollard@google.com> * Update test/fixtures/dialects/clickhouse/final.sql Co-authored-by: Barry Pollard <barrypollard@google.com> Co-authored-by: Barry Pollard <barrypollard@google.com> Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>
- Loading branch information
1 parent
153c438
commit e42f60c
Showing
3 changed files
with
101 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
select a | ||
from my_table final | ||
where a > 0; | ||
|
||
SELECT sum(bytes) | ||
FROM system.parts as table_alias final | ||
WHERE active; |
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,64 @@ | ||
# 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: 1d3370a426ccdd899c3d108235a7fb028f8644a7b30c867df3912357ed9231b9 | ||
file: | ||
- statement: | ||
select_statement: | ||
select_clause: | ||
keyword: select | ||
select_clause_element: | ||
column_reference: | ||
identifier: a | ||
from_clause: | ||
keyword: from | ||
from_expression: | ||
from_expression_element: | ||
table_expression: | ||
table_reference: | ||
identifier: my_table | ||
keyword: final | ||
where_clause: | ||
keyword: where | ||
expression: | ||
column_reference: | ||
identifier: a | ||
comparison_operator: | ||
raw_comparison_operator: '>' | ||
literal: '0' | ||
- statement_terminator: ; | ||
- statement: | ||
select_statement: | ||
select_clause: | ||
keyword: SELECT | ||
select_clause_element: | ||
function: | ||
function_name: | ||
function_name_identifier: sum | ||
bracketed: | ||
start_bracket: ( | ||
expression: | ||
column_reference: | ||
identifier: bytes | ||
end_bracket: ) | ||
from_clause: | ||
keyword: FROM | ||
from_expression: | ||
from_expression_element: | ||
table_expression: | ||
table_reference: | ||
- identifier: system | ||
- dot: . | ||
- identifier: parts | ||
alias_expression: | ||
keyword: as | ||
identifier: table_alias | ||
keyword: final | ||
where_clause: | ||
keyword: WHERE | ||
expression: | ||
column_reference: | ||
identifier: active | ||
- statement_terminator: ; |