Skip to content

Commit 2c732ad

Browse files
committed
fixes #1255
1 parent 1ecffd2 commit 2c732ad

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,7 @@ String RelObjectNameWithoutValue() :
14161416
| tk=<K_ALGORITHM>
14171417
| tk=<K_BYTE> | tk=<K_CHAR> | tk=<K_CHANGE> | tk=<K_CHARACTER>
14181418
| tk=<K_CAST> | tk=<K_COMMENT> | tk=<K_COSTS> | tk=<K_DISABLE> | tk=<K_DESC>
1419-
| tk=<K_DO> | tk=<K_EXTRACT> | tk=<K_FIRST> | tk=<K_FOLLOWING> | tk=<K_JSON>
1419+
| tk=<K_DO> | tk=<K_EXTRACT> | tk=<K_FILTER> | tk=<K_FIRST> | tk=<K_FOLLOWING> | tk=<K_JSON>
14201420
| tk=<K_LAST> | tk=<K_LEADING> | tk=<K_MATERIALIZED> | tk=<K_NULLS> | tk=<K_PARTITION> | tk=<K_RANGE>
14211421
| tk=<K_ROW> | tk=<K_ROWS> | tk=<K_SIBLINGS> | tk=<K_XML>
14221422
| tk=<K_COLUMN> | tk=<K_REPLACE> | tk=<K_TRUNCATE> | tk=<K_KEY>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4659,4 +4659,9 @@ public void testDB2SpecialRegisterDateTimeIssue1249() throws JSQLParserException
46594659
assertSqlCanBeParsedAndDeparsed("SELECT * FROM test.abc WHERE col > CURRENT_DATE", true);
46604660
assertSqlCanBeParsedAndDeparsed("SELECT * FROM test.abc WHERE col > CURRENT DATE", true);
46614661
}
4662+
4663+
@Test
4664+
public void testKeywordFilterIssue1255() throws JSQLParserException {
4665+
assertSqlCanBeParsedAndDeparsed("SELECT col1 AS filter FROM table");
4666+
}
46624667
}

0 commit comments

Comments
 (0)