Skip to content

Commit 4ac85f0

Browse files
committed
fixes #89
1 parent ea068ea commit 4ac85f0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/main/javacc/net/sf/jsqlparser/parser/JSqlParserCC.jj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ String RelObjectName():
517517
| tk=<K_LAST> | tk=<K_MATERIALIZED> | tk=<K_NULLS> | tk=<K_PARTITION> | tk=<K_RANGE>
518518
| tk=<K_ROW> | tk=<K_ROWS> | tk=<K_SIBLINGS> | tk=<K_VALUE> | tk=<K_XML>
519519
| tk=<K_COLUMN> | tk=<K_REPLACE> | tk=<K_TRUNCATE> | tk=<K_KEY> | tk=<K_ANY>
520+
| tk=<K_OPEN>
520521
)
521522

522523
{ return tk.image; }

src/test/java/net/sf/jsqlparser/test/select/SelectTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,6 +1602,11 @@ public void testReservedKeyword() throws JSQLParserException {
16021602
final Select select = (Select) parserManager.parse(new StringReader(statement));
16031603
assertStatementCanBeDeparsedAs(select, statement);
16041604
}
1605+
1606+
public void testReservedKeyword2() throws JSQLParserException {
1607+
final String stmt = "SELECT open FROM tableName";
1608+
assertSqlCanBeParsedAndDeparsed(stmt);
1609+
}
16051610

16061611
public void testCharacterSetClause() throws JSQLParserException {
16071612
String stmt = "SELECT DISTINCT CAST(`view0`.`nick2` AS CHAR (8000) CHARACTER SET utf8) AS `v0` FROM people `view0` WHERE `view0`.`nick2` IS NOT NULL";

0 commit comments

Comments
 (0)