File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
main/javacc/net/sf/jsqlparser/parser
test/java/net/sf/jsqlparser/test/select Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2127,10 +2127,11 @@ ColDataType ColDataType():
21272127{
21282128 ColDataType colDataType = new ColDataType();
21292129 Token tk = null;
2130+ Token tk2 = null;
21302131 ArrayList argumentsStringList = new ArrayList();
21312132}
21322133{
2133- ( <K_CHARACTER> <K_VARYING> { colDataType.setDataType("character varying" ); }
2134+ ( tk= <K_CHARACTER> tk2= <K_VARYING> { colDataType.setDataType(tk.image + " " + tk2.image ); }
21342135 | tk=<S_IDENTIFIER> { colDataType.setDataType(tk.image); } )
21352136
21362137
Original file line number Diff line number Diff line change @@ -693,6 +693,11 @@ public void testCastTypeProblem6() throws JSQLParserException {
693693 String stmt = "SELECT 'test'::character varying FROM tabelle1" ;
694694 assertSqlCanBeParsedAndDeparsed (stmt );
695695 }
696+
697+ public void testCastTypeProblem7 () throws JSQLParserException {
698+ String stmt = "SELECT CAST('test' AS character varying) FROM tabelle1" ;
699+ assertSqlCanBeParsedAndDeparsed (stmt );
700+ }
696701
697702 public void testCaseElseAddition () throws JSQLParserException {
698703 String stmt = "SELECT CASE WHEN 1 + 3 > 20 THEN 0 ELSE 1000 + 1 END AS d FROM dual" ;
You can’t perform that action at this time.
0 commit comments