-
-
Notifications
You must be signed in to change notification settings - Fork 650
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into redshift-dialect
- Loading branch information
Showing
3 changed files
with
113 additions
and
3 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
17 changes: 17 additions & 0 deletions
17
test/fixtures/dialects/tsql/stored_procedured_mixed_statements.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,17 @@ | ||
CREATE PROC [Reporting].[PowerPlan] AS | ||
|
||
DECLARE @DATEFUNCTION DATE = GETDATE() | ||
|
||
DROP TABLE [Reporting].[PowerPlan_BASE]; | ||
|
||
|
||
BEGIN | ||
SELECT 1 | ||
|
||
CREATE TABLE #TempTest | ||
WITH (DISTRIBUTION = ROUND_ROBIN, HEAP) AS | ||
(SELECT 2 AS Two, | ||
3 AS Three, | ||
4 AS Four | ||
) | ||
END |
90 changes: 90 additions & 0 deletions
90
test/fixtures/dialects/tsql/stored_procedured_mixed_statements.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,90 @@ | ||
# 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: 5a9199e249ff2e03ef14c6833eb96ea0924cd942867ba7b8fa5f128d3a0f3986 | ||
file: | ||
batch: | ||
create_procedure_statement: | ||
- keyword: CREATE | ||
- keyword: PROC | ||
- object_reference: | ||
- identifier: '[Reporting]' | ||
- dot: . | ||
- identifier: '[PowerPlan]' | ||
- keyword: AS | ||
- procedure_statement: | ||
- statement: | ||
declare_segment: | ||
keyword: DECLARE | ||
parameter: '@DATEFUNCTION' | ||
data_type: | ||
identifier: DATE | ||
comparison_operator: '=' | ||
function: | ||
function_name: | ||
function_name_identifier: GETDATE | ||
bracketed: | ||
start_bracket: ( | ||
end_bracket: ) | ||
- statement: | ||
drop_statement: | ||
- keyword: DROP | ||
- keyword: TABLE | ||
- table_reference: | ||
- identifier: '[Reporting]' | ||
- dot: . | ||
- identifier: '[PowerPlan_BASE]' | ||
- statement_terminator: ; | ||
- begin_end_block: | ||
- keyword: BEGIN | ||
- statement: | ||
select_statement: | ||
select_clause: | ||
keyword: SELECT | ||
select_clause_element: | ||
literal: '1' | ||
- statement: | ||
create_table_as_select_statement: | ||
- keyword: CREATE | ||
- keyword: TABLE | ||
- table_reference: | ||
identifier: '#TempTest' | ||
- table_distribution_index_clause: | ||
keyword: WITH | ||
bracketed: | ||
start_bracket: ( | ||
table_distribution_clause: | ||
- keyword: DISTRIBUTION | ||
- comparison_operator: '=' | ||
- keyword: ROUND_ROBIN | ||
comma: ',' | ||
table_index_clause: | ||
keyword: HEAP | ||
end_bracket: ) | ||
- keyword: AS | ||
- bracketed: | ||
start_bracket: ( | ||
select_statement: | ||
select_clause: | ||
- keyword: SELECT | ||
- select_clause_element: | ||
literal: '2' | ||
alias_expression: | ||
keyword: AS | ||
identifier: Two | ||
- comma: ',' | ||
- select_clause_element: | ||
literal: '3' | ||
alias_expression: | ||
keyword: AS | ||
identifier: Three | ||
- comma: ',' | ||
- select_clause_element: | ||
literal: '4' | ||
alias_expression: | ||
keyword: AS | ||
identifier: Four | ||
end_bracket: ) | ||
- keyword: END |