File tree Expand file tree Collapse file tree 2 files changed +7
-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 +7
-1
lines changed Original file line number Diff line number Diff line change @@ -3858,7 +3858,8 @@ ColDataType ColDataType():
38583858 | ( tk=<S_IDENTIFIER> | tk=<K_DATETIMELITERAL> | tk=<K_DATE_LITERAL> | tk=<K_XML> | tk=<K_INTERVAL> | tk=<DT_ZONE> | tk=<K_CHAR> | tk=<K_SET> )
38593859 { colDataType.setDataType(tk.image); }
38603860 | tk=<K_UNSIGNED> tk2=<S_IDENTIFIER> {colDataType.setDataType(tk.image + " " + tk2.image);}
3861- | tk=<K_SIGNED> tk2=<S_IDENTIFIER> {colDataType.setDataType(tk.image + " " + tk2.image);}
3861+ | LOOKAHEAD(2) tk=<K_SIGNED> tk2=<S_IDENTIFIER> {colDataType.setDataType(tk.image + " " + tk2.image);}
3862+ | tk=<K_SIGNED> { colDataType.setDataType(tk.image);}
38623863 )
38633864
38643865 [LOOKAHEAD(2) "(" {tk2 =null;} ( (tk=<S_LONG> [ tk2=<K_BYTE> | tk2=<K_CHAR> ] | tk=<S_CHAR_LITERAL> | tk=<S_IDENTIFIER> )
Original file line number Diff line number Diff line change @@ -2944,6 +2944,11 @@ public void testCastToSignedInteger() throws JSQLParserException {
29442944 assertSqlCanBeParsedAndDeparsed ("SELECT CAST(contact_id AS SIGNED INTEGER) FROM contact WHERE contact_id = 20" );
29452945 }
29462946
2947+ @ Test
2948+ public void testCastToSigned () throws JSQLParserException {
2949+ assertSqlCanBeParsedAndDeparsed ("SELECT CAST(contact_id AS SIGNED) FROM contact WHERE contact_id = 20" );
2950+ }
2951+
29472952// @Test
29482953// public void testWhereIssue240_notBoolean() {
29492954// try {
You can’t perform that action at this time.
0 commit comments