matrixone icon indicating copy to clipboard operation
matrixone copied to clipboard

[Bug]: minus (-) operator doesn't support DATE/DATETIME type

Open domingozhang opened this issue 3 years ago • 2 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):
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

select cast('2022-02-01' as date)-cast('2022-01-01' as date); Operator '-' with parameters [DATE DATE] will be implemented in future version.

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

No response

domingozhang avatar Jun 23 '22 12:06 domingozhang

minus operator needs to be supported in 0.6.0

domingozhang avatar Jul 01 '22 09:07 domingozhang

'+' is also

m-schen avatar Jul 03 '22 07:07 m-schen

mysql> select cast('2022-02-01' as date)-cast('2022-01-01' as date); +-----------------------------------------------------+ | cast(2022-02-01 as date) - cast(2022-01-01 as date) | +-----------------------------------------------------+ | 31 | +-----------------------------------------------------+ 1 row in set (0.00 sec)

mysql>

aressu1985 avatar Oct 24 '22 12:10 aressu1985