matrixone icon indicating copy to clipboard operation
matrixone copied to clipboard

[Bug]: `timestamp` does not support `mod` operator and inappropriate err message

Open sukki37 opened this issue 3 years ago • 1 comments

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

sukki37 avatar Sep 26 '22 03:09 sukki37

MO has no implicit conversion from timestamp to bigint but mysql has. This is a normal result.

domingozhang avatar Oct 10 '22 04:10 domingozhang

@domingozhang will we support in the future version?

sukki37 avatar Oct 29 '22 02:10 sukki37

timestamp -> int can be supported in future int -> timestamp may not

domingozhang avatar Oct 29 '22 03:10 domingozhang

feature has been raised #6616

domingozhang avatar Dec 02 '22 10:12 domingozhang