File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
main/jjtree/net/sf/jsqlparser/parser
test/java/net/sf/jsqlparser/statement/select Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -5021,7 +5021,7 @@ ColDataType ColDataType():
5021
5021
(
5022
5022
(tk=<K_CHARACTER> | tk=<K_BIT>) [tk2=<K_VARYING>] { colDataType.setDataType(tk.image + (tk2!=null?" " + tk2.image:"")); }
5023
5023
| tk=<K_DOUBLE> [LOOKAHEAD(2) tk2=<K_PRECISION>] { colDataType.setDataType(tk.image + (tk2!=null?" " + tk2.image:"")); }
5024
- | ( tk=<S_IDENTIFIER> | tk=<K_DATETIMELITERAL> | tk=<K_DATE_LITERAL> | tk=<K_XML> | tk=<K_INTERVAL>
5024
+ | ( tk=<S_IDENTIFIER> | tk=<S_QUOTED_IDENTIFIER> | tk=< K_DATETIMELITERAL> | tk=<K_DATE_LITERAL> | tk=<K_XML> | tk=<K_INTERVAL>
5025
5025
| tk=<DT_ZONE> | tk=<K_CHAR> | tk=<K_SET> | tk=<K_BINARY> | tk=<K_JSON> )
5026
5026
[ "." tk2=<S_IDENTIFIER> ]
5027
5027
{ if (tk2!=null) colDataType.setDataType(tk.image + "." + tk2.image); else colDataType.setDataType(tk.image); }
Original file line number Diff line number Diff line change @@ -1166,6 +1166,11 @@ public void testNamedParametersPR702_2() throws JSQLParserException {
1166
1166
assertSqlCanBeParsedAndDeparsed ("SELECT substring(id from 2 for 3) FROM mytable" );
1167
1167
}
1168
1168
1169
+ @ Test
1170
+ public void testQuotedCastExpression () throws JSQLParserException {
1171
+ assertSqlCanBeParsedAndDeparsed ("SELECT col FROM test WHERE status = CASE WHEN anothercol = 5 THEN 'pending'::\" enum_test\" END" );
1172
+ }
1173
+
1169
1174
@ Test
1170
1175
public void testWhere () throws JSQLParserException {
1171
1176
You can’t perform that action at this time.
0 commit comments