mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
fix scale init
This commit is contained in:
parent
3e9428515c
commit
54887dacbf
@ -999,8 +999,11 @@ public:
|
||||
return decimalResultType<is_multiply, is_division>(left, right);
|
||||
}();
|
||||
|
||||
typename ResultDataType::FieldType scale_a = type.scaleFactorFor(left, is_multiply);
|
||||
typename ResultDataType::FieldType scale_b = type.scaleFactorFor(right, is_multiply || is_division);
|
||||
typename ResultDataType::FieldType scale_a = dec_a ? type.scaleFactorFor(left, is_multiply) : 0;
|
||||
typename ResultDataType::FieldType scale_b = dec_b
|
||||
? type.scaleFactorFor(right, is_multiply || is_division)
|
||||
: 0;
|
||||
|
||||
if constexpr (IsDataTypeDecimal<RightDataType> && is_division)
|
||||
scale_a = right.getScaleMultiplier();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user