Skip to content

Commit e0b3a18

Browse files
committed
fixes #1065
1 parent 8c7ee28 commit e0b3a18

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2735,9 +2735,9 @@ Expression InExpression() #InExpression :
27352735
(
27362736
// syntactic lookahead for a multi expression list, ie: ((a,b),(c,d))
27372737
LOOKAHEAD(3) multiExpressionList = MultiInExpressions()
2738-
| LOOKAHEAD(Function()) rightExpression = Function()
2739-
| token=<S_CHAR_LITERAL> { rightExpression = new StringValue(token.image); }
2740-
| "(" (LOOKAHEAD(3) rightItemsList=SubSelect() | rightItemsList=SimpleExpressionList() )")"
2738+
| LOOKAHEAD(3) rightExpression = Function()
2739+
| LOOKAHEAD(2) token=<S_CHAR_LITERAL> { rightExpression = new StringValue(token.image); }
2740+
| LOOKAHEAD(3) "(" (LOOKAHEAD(3) rightItemsList=SubSelect() | rightItemsList=SimpleExpressionList() )")"
27412741
| rightExpression = SimpleExpression()
27422742
)
27432743
{

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4330,6 +4330,7 @@ public void testIssue1068() throws JSQLParserException {
43304330
@Test
43314331
public void selectWithSingleIn() throws JSQLParserException {
43324332
assertSqlCanBeParsedAndDeparsed("SELECT 1 FROM dual WHERE a IN 1");
4333+
}
43334334

43344335
@Test
43354336
public void testKeywordSequenceIssue1075() throws JSQLParserException {
@@ -4338,5 +4339,6 @@ public void testKeywordSequenceIssue1075() throws JSQLParserException {
43384339

43394340
@Test
43404341
public void testKeywordSequenceIssue1074() throws JSQLParserException {
4342+
assertSqlCanBeParsedAndDeparsed("SELECT * FROM t_user WITH (NOLOCK)");
43414343
}
43424344
}

0 commit comments

Comments
 (0)