mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
hotfix (decimal scale)
This commit is contained in:
parent
02f016579c
commit
af00724c52
@ -144,7 +144,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (scale == 0)
|
if (scale == 0)
|
||||||
return x;
|
return x;
|
||||||
return x / scale;
|
return x / getScaleMultiplier();
|
||||||
}
|
}
|
||||||
|
|
||||||
T fractionalPart(T x) const
|
T fractionalPart(T x) const
|
||||||
@ -153,7 +153,7 @@ public:
|
|||||||
return 0;
|
return 0;
|
||||||
if (x < 0)
|
if (x < 0)
|
||||||
x *= -1;
|
x *= -1;
|
||||||
return x % scale;
|
return x % getScaleMultiplier();
|
||||||
}
|
}
|
||||||
|
|
||||||
T maxWholeValue() const { return getScaleMultiplier(maxDecimalPrecision<T>() - scale) - 1; }
|
T maxWholeValue() const { return getScaleMultiplier(maxDecimalPrecision<T>() - scale) - 1; }
|
||||||
|
Loading…
Reference in New Issue
Block a user