forked from sqlfluff/sqlfluff
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5944: Add support for databricks named parameters (sqlfluff#5946)
Co-authored-by: Adam Weeden <adam.weeden@encoura.org>
- Loading branch information
Showing
3 changed files
with
132 additions
and
0 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 @@ | ||
--https://docs.databricks.com/en/sql/language-manual/sql-ref-function-invocation.html#named-parameter-invocation | ||
|
||
select my_function(arg1 => 3, arg2 => 4) from dual; | ||
|
||
select my_function(3, arg2 => 4) from dual; | ||
|
||
select my_function(arg1 => 3, 4) from dual; |
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,91 @@ | ||
# 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: 96a8a90d5cb19753570b96e0b15c0390b1676bb54dd1a8c226a75f998e31ea54 | ||
file: | ||
- statement: | ||
select_statement: | ||
select_clause: | ||
keyword: select | ||
select_clause_element: | ||
function: | ||
function_name: | ||
function_name_identifier: my_function | ||
bracketed: | ||
- start_bracket: ( | ||
- named_argument: | ||
naked_identifier: arg1 | ||
right_arrow: => | ||
expression: | ||
numeric_literal: '3' | ||
- comma: ',' | ||
- named_argument: | ||
naked_identifier: arg2 | ||
right_arrow: => | ||
expression: | ||
numeric_literal: '4' | ||
- end_bracket: ) | ||
from_clause: | ||
keyword: from | ||
from_expression: | ||
from_expression_element: | ||
table_expression: | ||
table_reference: | ||
naked_identifier: dual | ||
- statement_terminator: ; | ||
- statement: | ||
select_statement: | ||
select_clause: | ||
keyword: select | ||
select_clause_element: | ||
function: | ||
function_name: | ||
function_name_identifier: my_function | ||
bracketed: | ||
start_bracket: ( | ||
expression: | ||
numeric_literal: '3' | ||
comma: ',' | ||
named_argument: | ||
naked_identifier: arg2 | ||
right_arrow: => | ||
expression: | ||
numeric_literal: '4' | ||
end_bracket: ) | ||
from_clause: | ||
keyword: from | ||
from_expression: | ||
from_expression_element: | ||
table_expression: | ||
table_reference: | ||
naked_identifier: dual | ||
- statement_terminator: ; | ||
- statement: | ||
select_statement: | ||
select_clause: | ||
keyword: select | ||
select_clause_element: | ||
function: | ||
function_name: | ||
function_name_identifier: my_function | ||
bracketed: | ||
start_bracket: ( | ||
named_argument: | ||
naked_identifier: arg1 | ||
right_arrow: => | ||
expression: | ||
numeric_literal: '3' | ||
comma: ',' | ||
expression: | ||
numeric_literal: '4' | ||
end_bracket: ) | ||
from_clause: | ||
keyword: from | ||
from_expression: | ||
from_expression_element: | ||
table_expression: | ||
table_reference: | ||
naked_identifier: dual | ||
- statement_terminator: ; |