matrixone
matrixone copied to clipboard
[Discussion]: What's the semantic of cast BIGINT as TIMESTAMP
Is there an existing issue for the same bug?
- [X] I have checked the existing issues.
Environment
I have add the convert rule
int64 >= timestamp ==> timestamp >= timestamp
But the semantic of int64 ==> timestamp is confused.
Some BVT result is different with MySQL.
e.g.
select * from t1 where a>20220102;
the type of a is timestamp
Actual Behavior
a 2020-01-01 00:00:00 2022-01-02 00:00:00 2022-01-02 00:00:01 2022-01-02 00:00:02
Expected Behavior
a 2022-01-02 00:00:01 2022-01-02 00:00:02
Steps to Reproduce
No response
Additional information
No response
and the case
select a-1 from t;
if a is timestamp, and we convert 1 into timestamp, we should support '-' operator between timestamp.
do we need calculate operator (+, -, / and so on) between timestamp?
it's just a discussion.
@m-schen any status update?
I recall that CAST bigint AS timestamp has the same result as from_unixtime. However it's not discussed.
Hello @m-schen. The bug issue in the BVT test code has not been removed,issues automatically open.
Hello @m-schen. The bug issue in the BVT test code has not been removed,issues automatically open.
after pr, it can be closed.