matrixone
matrixone copied to clipboard
[Bug]: `timestamp` does not support `mod` operator and inappropriate err message
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):f1402e276c2519eb11920302f50bc47394cdea05
- Hardware parameters:
- OS type:
- Others:
Actual Behavior
mysql> create table t3(b timestamp);
Query OK, 0 rows affected (0.04 sec)
mysql> select b from t3;
Empty set (0.01 sec)
mysql> select b % 10 from t3;
ERROR 20203 (HY000): invalid argument operator %, bad value [TIMESTAMP TIMESTAMP]
Expected Behavior
The following is the result from MySQL
mysql> create table t3(b date);
Query OK, 0 rows affected (0.01 sec)
mysql> select from_unixtime(b%300) from t3;
Empty set (0.00 sec)
Steps to Reproduce
No response
Additional information
No response
MO has no implicit conversion from timestamp to bigint but mysql has. This is a normal result.
@domingozhang will we support in the future version?
timestamp -> int can be supported in future int -> timestamp may not
feature has been raised #6616