Skip to content

Commit

Permalink
fixes #1255
Browse files Browse the repository at this point in the history
  • Loading branch information
wumpz committed Jul 16, 2021
1 parent 1ecffd2 commit 2c732ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ String RelObjectNameWithoutValue() :
| tk=<K_ALGORITHM>
| tk=<K_BYTE> | tk=<K_CHAR> | tk=<K_CHANGE> | tk=<K_CHARACTER>
| tk=<K_CAST> | tk=<K_COMMENT> | tk=<K_COSTS> | tk=<K_DISABLE> | tk=<K_DESC>
| tk=<K_DO> | tk=<K_EXTRACT> | tk=<K_FIRST> | tk=<K_FOLLOWING> | tk=<K_JSON>
| tk=<K_DO> | tk=<K_EXTRACT> | tk=<K_FILTER> | tk=<K_FIRST> | tk=<K_FOLLOWING> | tk=<K_JSON>
| tk=<K_LAST> | tk=<K_LEADING> | tk=<K_MATERIALIZED> | tk=<K_NULLS> | tk=<K_PARTITION> | tk=<K_RANGE>
| tk=<K_ROW> | tk=<K_ROWS> | tk=<K_SIBLINGS> | tk=<K_XML>
| tk=<K_COLUMN> | tk=<K_REPLACE> | tk=<K_TRUNCATE> | tk=<K_KEY>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4659,4 +4659,9 @@ public void testDB2SpecialRegisterDateTimeIssue1249() throws JSQLParserException
assertSqlCanBeParsedAndDeparsed("SELECT * FROM test.abc WHERE col > CURRENT_DATE", true);
assertSqlCanBeParsedAndDeparsed("SELECT * FROM test.abc WHERE col > CURRENT DATE", true);
}

@Test
public void testKeywordFilterIssue1255() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed("SELECT col1 AS filter FROM table");
}
}

0 comments on commit 2c732ad

Please sign in to comment.