Skip to content

Commit

Permalink
Use Ref.keyword for terminator insert
Browse files Browse the repository at this point in the history
  • Loading branch information
jpy-git committed Mar 4, 2022
1 parent 8b5657c commit d958f86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sqlfluff/dialects/dialect_snowflake.py
Expand Up @@ -3950,7 +3950,7 @@ class SelectClauseSegment(BaseSegment):
type = "select_clause"
match_grammar = ansi_dialect.get_segment("SelectClauseSegment").match_grammar.copy()
match_grammar.terminator = match_grammar.terminator.copy(
insert=["FETCH", "OFFSET"],
insert=[Ref.keyword("FETCH"), Ref.keyword("OFFSET")],
)
parse_grammar = ansi_dialect.get_segment("SelectClauseSegment").parse_grammar.copy()

Expand All @@ -3967,7 +3967,7 @@ class OrderByClauseSegment(BaseSegment):
"OrderByClauseSegment"
).match_grammar.copy()
match_grammar.terminator = match_grammar.terminator.copy(
insert=["FETCH", "OFFSET"],
insert=[Ref.keyword("FETCH"), Ref.keyword("OFFSET")],
)
parse_grammar = Sequence(
"ORDER",
Expand Down Expand Up @@ -3998,6 +3998,6 @@ class HavingClauseSegment(BaseSegment):
type = "having_clause"
match_grammar = ansi_dialect.get_segment("HavingClauseSegment").match_grammar.copy()
match_grammar.terminator = match_grammar.terminator.copy(
insert=["FETCH", "OFFSET"],
insert=[Ref.keyword("FETCH"), Ref.keyword("OFFSET")],
)
parse_grammar = ansi_dialect.get_segment("HavingClauseSegment").parse_grammar.copy()

0 comments on commit d958f86

Please sign in to comment.