chenhao7253886 opened a new issue #1369: Casting float string to int will 
return null
URL: https://github.com/apache/incubator-doris/issues/1369
 
 
   Because StringParser does't support cast float string to int,  as following:
   mysql> select cast("11.22" as int);
   +----------------------+
   | CAST('11.22' AS INT) |
   +----------------------+
   |                 NULL |
   +----------------------+
   1 row in set (0.01 sec)
   so we will have to change SQL to this:
   mysql> select cast(cast("11.22" as double) as int);
   +--------------------------------------+
   | CAST(CAST('11.22' AS DOUBLE) AS INT) |
   +--------------------------------------+
   |                                   11 |
   +--------------------------------------+
   1 row in set (0.00 sec)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to