negate for dec128

This commit is contained in:
chertus 2018-08-07 17:12:24 +03:00
parent de68022fc5
commit 7984b4f91d
3 changed files with 6 additions and 6 deletions

View File

@ -1258,8 +1258,8 @@ class FunctionUnaryArithmetic : public IFunction
DataTypeFloat32,
DataTypeFloat64,
DataTypeDecimal<Dec32>,
DataTypeDecimal<Dec64>
//DataTypeDecimal<Dec128> // TODO: needs visitor
DataTypeDecimal<Dec64>,
DataTypeDecimal<Dec128>
>(type, std::forward<F>(f));
}

View File

@ -17,6 +17,6 @@
63.420000000 -21.420000000 41.580000000 890.820000000 -890.820000000
63.420000000000000000 -21.420000000000000000 41.580000000000000000 890.820000000000000000 -890.820000000000000000 0.495049504950495049 1.980198019801980198
63.42 -21.42 41.58 890.82 -890.82 0.49 1.98
-42 42 42 0.420000000 0.420000000000000000 42.420 42.420000000 42.42
0 0 0 0.000000000 0.000000000000000000 0.000 0.000000000 0.00
42 -42 -42 -0.420000000 -0.420000000000000000 -42.420 -42.420000000 -42.42
-42 42 42 42 0.420000000 0.420000000000000000 0.42000000000000000000000000000000000000 42.420 42.420000000 42.42
0 0 0 0 0.000000000 0.000000000000000000 0.00000000000000000000000000000000000000 0.000 0.000000000 0.00
42 -42 -42 -42 -0.420000000 -0.420000000000000000 -0.42000000000000000000000000000000000000 -42.420 -42.420000000 -42.42

View File

@ -49,6 +49,6 @@ SELECT 21 + h, 21 - h, 84 - h, 21 * h, -21 * h FROM test.decimal WHERE h > 0; --
SELECT 21 + i, 21 - i, 84 - i, 21 * i, -21 * i, 21 / i, 84 / i FROM test.decimal WHERE i > 0;
SELECT 21 + j, 21 - j, 84 - j, 21 * j, -21 * j, 21 / j, 84 / j FROM test.decimal WHERE j > 0;
SELECT a, -a, -b, -d, -e, -g, -h, -j from test.decimal ORDER BY a;
SELECT a, -a, -b, -c, -d, -e, -f, -g, -h, -j from test.decimal ORDER BY a;
DROP TABLE IF EXISTS test.decimal;