mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Fix round function error code
This commit is contained in:
parent
b4cf1410ed
commit
eb656c2a65
@ -394,8 +394,8 @@ public:
|
||||
case 1000000000000000000ULL: return applyImpl<1000000000000000000ULL>(in, out);
|
||||
case 10000000000000000000ULL: return applyImpl<10000000000000000000ULL>(in, out);
|
||||
default:
|
||||
throw Exception("Logical error: unexpected 'scale' parameter passed to function IntegerRoundingComputation::compute",
|
||||
ErrorCodes::LOGICAL_ERROR);
|
||||
throw Exception("Unexpected 'scale' parameter passed to function",
|
||||
ErrorCodes::BAD_ARGUMENTS);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -43,3 +43,5 @@ SELECT 12345.6789 AS x, floor(x, -1), floor(x, -2), floor(x, -3), floor(x, -4),
|
||||
|
||||
SELECT roundToExp2(100), roundToExp2(64), roundToExp2(3), roundToExp2(0), roundToExp2(-1);
|
||||
SELECT roundToExp2(0.9), roundToExp2(0), roundToExp2(-0.5), roundToExp2(-0.6), roundToExp2(-0.2);
|
||||
|
||||
SELECT ceil(29375422, -54212) --{serverError 36}
|
||||
|
Loading…
Reference in New Issue
Block a user