diff --git a/src/Core/DecimalComparison.h b/src/Core/DecimalComparison.h index 9665d39cf1c..5b017cd4634 100644 --- a/src/Core/DecimalComparison.h +++ b/src/Core/DecimalComparison.h @@ -36,10 +36,13 @@ inline bool allowDecimalComparison(const DataTypePtr & left_type, const DataType return false; } -template struct ConstructDecInt { using Type = Int32; }; +template struct ConstructDecInt; +template <> struct ConstructDecInt<1> { using Type = Int32; }; +template <> struct ConstructDecInt<2> { using Type = Int32; }; +template <> struct ConstructDecInt<4> { using Type = Int32; }; template <> struct ConstructDecInt<8> { using Type = Int64; }; template <> struct ConstructDecInt<16> { using Type = Int128; }; -template <> struct ConstructDecInt<48> { using Type = Int256; }; +template <> struct ConstructDecInt<32> { using Type = Int256; }; template struct DecCompareInt