Skip to content

Commit ed089f1

Browse files
committed
fixes #1211
1 parent b8ee752 commit ed089f1

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,7 @@ String RelObjectNameWithoutValue() :
13491349
| tk=<K_ZONE> | tk=<K_COLUMNS> | tk=<K_DESCRIBE> | tk=<K_FN> | tk=<K_PATH>
13501350
| tk=<K_DATE_LITERAL> | tk=<K_NEXTVAL> | tk=<K_TRUE> | tk=<K_FALSE> | tk=<K_DUPLICATE>
13511351
| tk=<K_READ> | tk=<K_SCHEMA> | tk=<K_SIGNED> | tk=<K_SIZE> | tk=<K_SEQUENCE> | tk=<K_SESSION> | tk=<K_SKIP>
1352+
| tk=<K_SYNONYM>
13521353
| tk=<K_VIEW> | tk=<K_NOLOCK> | tk=<K_VALIDATE> | tk=<K_CYCLE> | tk=<K_OF> | tk=<K_EXCLUDE>
13531354
/*| tk=<K_PLACING> | tk=<K_BOTH> | tk=<K_LEADING> | tk=<K_TRAILING> */
13541355
| tk=<K_FORMAT> | tk=<K_DIV> | tk=<K_UNSIGNED> | tk=<K_CASE>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4540,4 +4540,9 @@ public void testKeywordCostsIssue1135() throws JSQLParserException {
45404540
public void testKeywordCostsIssue1135_2() throws JSQLParserException {
45414541
assertSqlCanBeParsedAndDeparsed("with sample_data(day, value) as (values (0, 13), (1, 12), (2, 15), (3, 4), (4, 8), (5, 16)) select day, value from sample_data", true);
45424542
}
4543+
4544+
@Test
4545+
public void testKeywordSynonymIssue1211() throws JSQLParserException {
4546+
assertSqlCanBeParsedAndDeparsed("select businessDate as \"bd\", synonym as \"synonym\" from sc.tab", true);
4547+
}
45434548
}

0 commit comments

Comments
 (0)