matrixone icon indicating copy to clipboard operation
matrixone copied to clipboard

[Enhancement]: The math function does not support the decimal type

Open aressu1985 opened this issue 3 years ago • 4 comments
trafficstars

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):0.4.0
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

mysql> select sin(dt) from numtable; ERROR 1105 (HY000): unknown error:'' not yet implemented for DECIMAL64 mysql> select abs(dt) from numtable; ERROR 1105 (HY000): unknown error:'' not yet implemented for DECIMAL64 mysql> select sinh(dt) from numtable; ERROR 1105 (HY000): unknown error:'' not yet implemented for DECIMAL64 mysql> select atan(dt) from numtable; ERROR 1105 (HY000): unknown error:'' not yet implemented for DECIMAL64 mysql> select acos(dt) from numtable; ERROR 1105 (HY000): unknown error:'' not yet implemented for DECIMAL64 mysql> select cot(dt) from numtable; ERROR 1105 (HY000): unknown error:'' not yet implemented for DECIMAL64 mysql> select tan(dt) from numtable; ERROR 1105 (HY000): unknown error:'' not yet implemented for DECIMAL64 mysql>

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

No response

aressu1985 avatar Apr 29 '22 01:04 aressu1985

this is not part of our v0.4 plan,

broccoliSpicy avatar Apr 29 '22 06:04 broccoliSpicy

I think I will implement this in v0.5

broccoliSpicy avatar May 06 '22 08:05 broccoliSpicy

@broccoliSpicy what's the current status here? can it still be implemented in 0.5?

dengn avatar Jun 30 '22 07:06 dengn

there are two solutions to these: 1. implicit cast decimal to float64 2. drop decimal's support for all math functions

notice: it is impossible/stupid for us to implement all math functions using our decimal data type representation,

broccoliSpicy avatar Jun 30 '22 08:06 broccoliSpicy

fixed

aressu1985 avatar Nov 27 '22 03:11 aressu1985