Skip to content

Commit

Permalink
fixes #614
Browse files Browse the repository at this point in the history
  • Loading branch information
wumpz committed May 12, 2018
1 parent 094cc80 commit 32c4d8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -2504,13 +2504,13 @@ Expression PrimaryExpression() #PrimaryExpression:
| retval = IntervalExpression()
)

[ "::" type=ColDataType() {
( "::" type=ColDataType() {
castExpr = new CastExpression();
castExpr.setUseCastKeyword(false);
castExpr.setLeftExpression(retval);
castExpr.setType(type);
retval=castExpr;
} ]
} )*

{
if (sign != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3161,4 +3161,9 @@ public void testProblemSqlFuncParamIssue605_2() throws JSQLParserException {
public void testSqlContainIsNullFunctionShouldBeParsed() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed("SELECT name, age, ISNULL(home, 'earn more money') FROM person");
}

@Test
public void testNestedCast() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed("SELECT acolumn::bit (64)::bigint FROM mytable");
}
}

0 comments on commit 32c4d8a

Please sign in to comment.