Skip to content

Commit

Permalink
fix(grammar): Support the usage of the keyword AS in table aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
felipebz committed Jun 15, 2024
1 parent 0b72375 commit 138ff5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ enum class DmlGrammar : GrammarRuleKey {
OBJECT_REFERENCE
),
b.optional(b.nextNot(b.firstOf(PARTITION, CROSS, USING, FULL, NATURAL, INNER, LEFT, RIGHT, OUTER, JOIN, RETURN, RETURNING, LOG, EXCEPT)),
b.optional(AS),
ALIAS
)
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class DmlTableExpressionClauseTest : RuleTest() {
@Test
fun matchesTableWithAlias() {
assertThat(p).matches("tab alias")
assertThat(p).matches("tab as alias")
}

@Test
Expand Down

0 comments on commit 138ff5e

Please sign in to comment.