-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
area/mysql-compatibilityIssues or PRs related to the mysql compatibilityIssues or PRs related to the mysql compatibilityarea/sql/functionIssues or PRs related to the SQL functionsIssues or PRs related to the SQL functionskind/fixCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
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.
Metadata
Metadata
Assignees
Labels
area/mysql-compatibilityIssues or PRs related to the mysql compatibilityIssues or PRs related to the mysql compatibilityarea/sql/functionIssues or PRs related to the SQL functionsIssues or PRs related to the SQL functionskind/fixCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.