Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Snowflake: Complete LIMIT grammar (#2784)
* Snowflake: Complete LIMIT grammar * Update src/sqlfluff/dialects/dialect_snowflake.py Co-authored-by: Barry Pollard <barry_pollard@hotmail.com> * Update src/sqlfluff/dialects/dialect_snowflake.py Co-authored-by: Barry Pollard <barry_pollard@hotmail.com> * Implement review feedback * Black * use match_grammar.terminator insert * Use Ref.keyword for terminator insert Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>
- Loading branch information
1 parent
267b6bb
commit 9f1c7fe
Showing
6 changed files
with
576 additions
and
8 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
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,29 @@ | ||
select c1 from testtable order by c1 limit 3; | ||
|
||
select c1 from testtable order by c1 limit 3 offset 3; | ||
|
||
select * from demo1 order by i limit null offset null; | ||
|
||
select * from demo1 order by i limit '' offset ''; | ||
|
||
select * from demo1 order by i limit $$$$ offset $$$$; | ||
|
||
select c1 from testtable order by c1 fetch 3; | ||
|
||
select c1 from testtable order by c1 fetch first 3; | ||
|
||
select c1 from testtable order by c1 fetch next 3; | ||
|
||
select c1 from testtable order by c1 fetch 1 row; | ||
|
||
select c1 from testtable order by c1 fetch 3 rows; | ||
|
||
select c1 from testtable order by c1 fetch 3 only; | ||
|
||
select c1 from testtable order by c1 offset 3 fetch 3; | ||
|
||
select c1 from testtable order by c1 offset 1 row fetch 1 row; | ||
|
||
select c1 from testtable order by c1 offset 3 rows fetch 3 rows; | ||
|
||
select c1 from testtable offset 3 fetch 3; |
Oops, something went wrong.