mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Fixed aggregate function avg
This commit is contained in:
parent
b810b28b08
commit
5ae1652d51
@ -33,7 +33,7 @@ struct AvgFraction
|
|||||||
|
|
||||||
/// Allow division by zero as sometimes we need to return NaN.
|
/// Allow division by zero as sometimes we need to return NaN.
|
||||||
/// Invoked only is either Numerator or Denominator are Decimal.
|
/// Invoked only is either Numerator or Denominator are Decimal.
|
||||||
Float64 NO_SANITIZE_UNDEFINED divideIfAnyDecimal(UInt32 num_scale, UInt32 denom_scale [[maybe_unused]]) const
|
Float64 NO_SANITIZE_UNDEFINED divideIfAnyDecimal(UInt32 num_scale, UInt32 denom_scale) const
|
||||||
{
|
{
|
||||||
if constexpr (IsDecimalNumber<Numerator> && IsDecimalNumber<Denominator>)
|
if constexpr (IsDecimalNumber<Numerator> && IsDecimalNumber<Denominator>)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user