morningman opened a new issue #4785:
URL: https://github.com/apache/incubator-doris/issues/4785


   **Describe the bug**
   Doris:
   ```
   mysql> select dayofweek("10:00:00");
   +-----------------------+
   | dayofweek('10:00:00') |
   +-----------------------+
   |                     2 |
   +-----------------------+
   1 row in set (0.06 sec)
   ```
   
   MySQL:
   ```
   mysql> select dayofweek("10:00:00");
   +-----------------------+
   | dayofweek("10:00:00") |
   +-----------------------+
   |                  NULL |
   +-----------------------+
   1 row in set, 1 warning (0.05 sec)
   ```
   
   **Why**
   This is because "10:00:00" is converted to "2020-00-00", both in Doris and 
MySQL.
   but `dayofweek("2020-00-00")` results in `NULL` in MySQL.
   


----------------------------------------------------------------
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]



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

Reply via email to