You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ai-easyAI直接干,人扫一眼就行kind/compatibilityThe compatibility with mysql 8.0 should be discussed further.priority/p0Critical feature that should be implemented in this version
MySQL ADDTIME function:
ADDTIME(expr1, expr2) - ADDTIME() adds expr2 to expr1 and returns the result. expr1 is a time or datetime expression, and expr2 is a time expression.
Expected Behavior
Expected behavior:
According to MySQL documentation, the function should return correct results.
Current Behavior in MatrixOne
This function is not implemented in MatrixOne.
Error Message: (20105, "not supported: function or operator 'addtime'")
Test Case
SELECT ADDTIME('2007-12-31 23:59:59.999999', '1 1:1:1.000002') AS result1
Note from MySQL documentation, so the return type of ADDTIME(vharchar, varchar) is not deterministic.
We will simply return DATETIME type.
If the first argument is a dynamic parameter (such as in a prepared statement), the return type is TIME.
Otherwise, the resolved type of the function is derived from the resolved type of the first argument.
mysql> SELECT ADDTIME('2007-12-31 23:59:59.999999', '1 1:1:1.000002');
-> '2008-01-02 01:01:01.000001'
mysql> SELECT ADDTIME('01:00:00.999999', '02:00:00.999998');
-> '03:00:01.999997'
ai-easyAI直接干,人扫一眼就行kind/compatibilityThe compatibility with mysql 8.0 should be discussed further.priority/p0Critical feature that should be implemented in this version
Activity
Addtime, matrixorigin#22964
fengttt commentedon Nov 22, 2025
Note from MySQL documentation, so the return type of ADDTIME(vharchar, varchar) is not deterministic.
We will simply return DATETIME type.
fengttt commentedon Nov 24, 2025
We want to fix ADDTIME and SUBTIME, to that the return type is the same as the first parameter.
Esp, the test files should be updated.
XuPeng-SH commentedon Nov 26, 2025
fixed
Ariznawlll commentedon Dec 5, 2025
verified