-
-
Notifications
You must be signed in to change notification settings - Fork 623
Open
Labels
bugSomething isn't workingSomething isn't workingcorrectnessWe don't return the same result as MySQLWe don't return the same result as MySQL
Description
In MySQL, datetime, date, and time values convert to number values by concatenating the datetime fields without any separators. For example date('2020-12-15') converts to 20201215 and time('12:34:54') converts to 123454.
We use the time.UTC().Unix to convert datetime values to numbers, which is not correct. select cast(now() as signed in MySQL returns 20260106142016 while it returns 1767708857 in Dolt.
For date values, it seems like we convert it to a string and then truncate. As a result, only the year ends up converting.
It seems like for time values, we don't support converting to numbers at all.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcorrectnessWe don't return the same result as MySQLWe don't return the same result as MySQL