From af00724c52643419a8ebaeca534252a896b5cce6 Mon Sep 17 00:00:00 2001 From: chertus Date: Tue, 24 Jul 2018 14:43:48 +0300 Subject: [PATCH] hotfix (decimal scale) --- dbms/src/DataTypes/DataTypesDecimal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbms/src/DataTypes/DataTypesDecimal.h b/dbms/src/DataTypes/DataTypesDecimal.h index f33385e0536..75d5cff9a90 100644 --- a/dbms/src/DataTypes/DataTypesDecimal.h +++ b/dbms/src/DataTypes/DataTypesDecimal.h @@ -144,7 +144,7 @@ public: { if (scale == 0) return x; - return x / scale; + return x / getScaleMultiplier(); } T fractionalPart(T x) const @@ -153,7 +153,7 @@ public: return 0; if (x < 0) x *= -1; - return x % scale; + return x % getScaleMultiplier(); } T maxWholeValue() const { return getScaleMultiplier(maxDecimalPrecision() - scale) - 1; }