Skip to content

Commit 84bf065

Browse files
committed
1 parent b63146f commit 84bf065

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
@@ -756,7 +756,7 @@ String RelObjectNameExt():
756756
String result=null;
757757
}
758758
{
759-
( result=RelObjectName() | tk=<K_LEFT> | tk=<K_RIGHT> | tk=<K_SET> | <K_DOUBLE> )
759+
( result=RelObjectName() | tk=<K_LEFT> | tk=<K_RIGHT> | tk=<K_SET> | <K_DOUBLE>)
760760
{
761761
if (tk!=null) result=tk.image;
762762
return result;

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,11 @@ public void testCastTypeProblem7() throws JSQLParserException {
12021202
String stmt = "SELECT CAST('test' AS character varying) FROM tabelle1";
12031203
assertSqlCanBeParsedAndDeparsed(stmt);
12041204
}
1205+
1206+
public void testCastTypeProblem8() throws JSQLParserException {
1207+
String stmt = "SELECT CAST('123' AS double precision) FROM tabelle1";
1208+
assertSqlCanBeParsedAndDeparsed(stmt);
1209+
}
12051210

12061211
public void testCaseElseAddition() throws JSQLParserException {
12071212
String stmt = "SELECT CASE WHEN 1 + 3 > 20 THEN 0 ELSE 1000 + 1 END AS d FROM dual";

0 commit comments

Comments
 (0)