englefly commented on PR #11630:
URL: https://github.com/apache/doris/pull/11630#issuecomment-1210396519

   The following two casts are not equivalent.
   
   mysql> select cast(cast("1990-09-01 1:00:00" as datetime) as int);
   +-----------------------------------------------------+
   | CAST(CAST('1990-09-01 1:00:00' AS DATETIME) AS INT) |
   +-----------------------------------------------------+
   |                                         -1977439664 |
   +-----------------------------------------------------+
   1 row in set (0.01 sec)
   
   mysql> select cast("1990-09-01 1:00:00" as int);
   +-----------------------------------+
   | CAST('1990-09-01 1:00:00' AS INT) |
   +-----------------------------------+
   |                              NULL |
   +-----------------------------------+
   1 row in set (0.01 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.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to