Skip to content

Commit 3f51651

Browse files
committed
fixes #1040
1 parent 3747f1c commit 3f51651

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
@@ -1331,6 +1331,7 @@ String RelObjectNameWithoutValue() :
13311331
| tk=<K_READ> | tk=<K_SCHEMA> | tk=<K_SIZE> | tk=<K_SESSION>
13321332
| tk=<K_VIEW> | tk=<K_NOLOCK> | tk=<K_VALIDATE> | tk=<K_CYCLE> | tk=<K_OF> | tk=<K_EXCLUDE>
13331333
/*| tk=<K_PLACING> | tk=<K_BOTH> | tk=<K_LEADING> | tk=<K_TRAILING> */
1334+
| tk=<K_FORMAT>
13341335
)
13351336

13361337
{ return tk.image; }

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4286,4 +4286,9 @@ public void testSelectConditionsIssue720And991() throws JSQLParserException {
42864286
assertSqlCanBeParsedAndDeparsed("SELECT 1 < 2 AS a, 0 IS NULL AS b");
42874287
// assertSqlCanBeParsedAndDeparsed("SELECT 1 < 2 AS a, (0 IS NULL) AS b");
42884288
}
4289+
4290+
@Test
4291+
public void testKeyWordExceptIssue1040() throws JSQLParserException {
4292+
assertSqlCanBeParsedAndDeparsed("SELECT FORMAT(100000, 2)");
4293+
}
42894294
}

0 commit comments

Comments
 (0)