File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -318,8 +318,11 @@ impl Dialect for SnowflakeDialect {
318318 }
319319
320320 // `FETCH` can be considered an alias as long as it's not followed by `FIRST`` or `NEXT`
321- // which would give it a different meanings, for example: `SELECT 1 FETCH FIRST 10 ROWS` - not an alias
322- Keyword :: FETCH if parser. peek_one_of_keywords ( & [ Keyword :: FIRST , Keyword :: NEXT ] ) . is_some ( ) =>
321+ // which would give it a different meanings, for example:
322+ // `SELECT 1 FETCH FIRST 10 ROWS` - not an alias
323+ // `SELECT 1 FETCH 10` - not an alias
324+ Keyword :: FETCH if parser. peek_one_of_keywords ( & [ Keyword :: FIRST , Keyword :: NEXT ] ) . is_some ( )
325+ || matches ! ( parser. peek_token( ) . token, Token :: Number ( _, _) ) =>
323326 {
324327 false
325328 }
@@ -367,8 +370,9 @@ impl Dialect for SnowflakeDialect {
367370 // `SELECT * FROM tbl FETCH FIRST 10 ROWS` - not an alias
368371 // `SELECT * FROM tbl FETCH 10` - not an alias
369372 Keyword :: FETCH
370- if parser. peek_keyword ( Keyword :: FIRST )
371- || parser. peek_keyword ( Keyword :: NEXT )
373+ if parser
374+ . peek_one_of_keywords ( & [ Keyword :: FIRST , Keyword :: NEXT ] )
375+ . is_some ( )
372376 || matches ! ( parser. peek_token( ) . token, Token :: Number ( _, _) ) =>
373377 {
374378 false
You can’t perform that action at this time.
0 commit comments