mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
fix
This commit is contained in:
parent
ed6d74b218
commit
fbaa8d3951
@ -236,19 +236,24 @@ struct DecimalBinaryOperation
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if constexpr(is_multiply && (!is_decimal_a || !is_decimal_b))
|
||||
else if constexpr(is_multiply && (!is_decimal_a || !is_decimal_b)) // BUG very bad solution
|
||||
{
|
||||
if (scale_a != 1)
|
||||
{
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
// BUG very bad solution
|
||||
c[i] = apply(undec(a[i]), undec(b[i])) / DecimalUtils::scaleMultiplier<NativeResultType>(scale_a);
|
||||
if constexpr(IsDecimalNumber<ResultType>)
|
||||
c[i] = apply(undec(a[i]), undec(b[i])) / DecimalUtils::scaleMultiplier<NativeResultType>(scale_a);
|
||||
else
|
||||
c[i] = apply(undec(a[i]), undec(b[i])) / DecimalUtils::scaleMultiplier<Int64>(scale_a);
|
||||
return;
|
||||
}
|
||||
else if (scale_b != 1)
|
||||
{
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
c[i] = apply(undec(a[i]), undec(b[i])) / DecimalUtils::scaleMultiplier<NativeResultType>(scale_b);
|
||||
if constexpr(IsDecimalNumber<ResultType>)
|
||||
c[i] = apply(undec(a[i]), undec(b[i])) / DecimalUtils::scaleMultiplier<NativeResultType>(scale_b);
|
||||
else
|
||||
c[i] = apply(undec(a[i]), undec(b[i])) / DecimalUtils::scaleMultiplier<Int64>(scale_b);
|
||||
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user