Skip to content

Commit

Permalink
Merge branch 'main' into add-release-notes-for-opensearch-ga
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-chen committed Jul 1, 2021
2 parents 1233397 + 399881d commit 6b2fb7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sql/src/main/antlr/OpenSearchSQLParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ adminStatement
;

showStatement
: SHOW TABLES tableFilter?
: SHOW TABLES tableFilter
;

describeStatement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,9 @@ public void canParseOrderByClause() {
"SELECT name, age FROM test ORDER BY name ASC NULLS FIRST, age DESC NULLS LAST"));
}

@Test
public void canNotParseShowStatementWithoutFilterClause() {
assertThrows(SyntaxCheckException.class, () -> parser.parse("SHOW TABLES"));
}

}

0 comments on commit 6b2fb7c

Please sign in to comment.