matrixone
matrixone copied to clipboard
[Bug]: wrong result of from_unixtime
Is there an existing issue for the same bug?
- [X] I have checked the existing issues.
Environment
- Version or commit-id (e.g. v0.1.0 or 8b23a93):
- Hardware parameters:
- OS type:
- Others:
Actual Behavior
mysql> SELECT FROM_UNIXTIME(2147483647) AS c1, FROM_UNIXTIME(2147483648) AS c2, FROM_UNIXTIME(2147483647.9999999) AS c3, FROM_UNIXTIME(32536771199) AS c4, FROM_UNIXTIME(32536771199.9999999) AS c5; +---------------------+---------------------+---------------------+---------------------+------+ | c1 | c2 | c3 | c4 | c5 | +---------------------+---------------------+---------------------+---------------------+------+ | 2038-01-19 03:14:07 | 2038-01-19 03:14:08 | 2038-01-19 03:14:08 | 3001-01-18 23:59:59 | NULL | +---------------------+---------------------+---------------------+---------------------+------+
Expected Behavior
mysql> SELECT -> FROM_UNIXTIME(2147483647) AS c1, -> FROM_UNIXTIME(2147483648) AS c2, -> FROM_UNIXTIME(2147483647.9999999) AS c3, -> FROM_UNIXTIME(32536771199) AS c4, -> FROM_UNIXTIME(32536771199.9999999) AS c5; +---------------------+---------------------+----------------------------+---------------------+------+ | c1 | c2 | c3 | c4 | c5 | +---------------------+---------------------+----------------------------+---------------------+------+ | 2038-01-19 11:14:07 | 2038-01-19 11:14:08 | 2038-01-19 11:14:08.000000 | 3001-01-19 07:59:59 | NULL | +---------------------+---------------------+----------------------------+---------------------+------+
Steps to Reproduce
No response
Additional information
No response
timezone related. move to 0.6.
mysql> select a + a from bb; ERROR 20203 (HY000): invalid argument operator +, bad value [CHAR CHAR] mysql> SELECT FROM_UNIXTIME(2147483647) AS c1, FROM_UNIXTIME(2147483648) AS c2, FROM_UNIXTIME(2147483647.9999999) AS c3, FROM_UNIXTIME(32536771199) AS c4, FROM_UNIXTIME(32536771199.9999999) AS c5; +---------------------+---------------------+----------------------------+---------------------+------+ | c1 | c2 | c3 | c4 | c5 | +---------------------+---------------------+----------------------------+---------------------+------+ | 2038-01-19 11:14:07 | 2038-01-19 11:14:08 | 2038-01-19 11:14:08.000000 | 3001-01-19 07:59:59 | NULL | +---------------------+---------------------+----------------------------+---------------------+------+ 1 row in set (0.00 sec)