Join GitHub today
expression: use ParseTimeFormNum instead of ParseTime #4706
dayOfWeek/dayOfMonth/dayOfYear and monthname/dayname with int64 will call call builtinCastIntAsTime, the behavior is diff from mysql. eg. dayOfWeek(123) works fine at mysql, but tidb will cause a error.
so, we should use ParseTimeFormNum instead of ParseTime, it is the code migration version of mysql's number_to_datetime func.