Skip to content

Commit fb60eaf

Browse files
authored
fix: correct state type for Decimal256 AVG aggregation (#17774)
fix: correct state type for Decimal256 AVG aggregation Fixed a typo in the AVG aggregation function where DecimalSumState was incorrectly used instead of DecimalAvgState.
1 parent 4c7b63b commit fb60eaf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/query/functions/src/aggregates/aggregate_avg.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ use databend_common_expression::with_number_mapped_type;
2727
use databend_common_expression::Scalar;
2828
use num_traits::AsPrimitive;
2929

30-
use super::aggregate_sum::DecimalSumState;
3130
use super::AggregateUnaryFunction;
3231
use super::FunctionData;
3332
use super::UnaryState;
@@ -283,7 +282,7 @@ pub fn try_create_aggregate_avg_function(
283282
Ok(Arc::new(func))
284283
} else {
285284
let func = AggregateUnaryFunction::<
286-
DecimalSumState<false, Decimal256Type>,
285+
DecimalAvgState<false, Decimal256Type>,
287286
Decimal256Type,
288287
Decimal256Type,
289288
>::try_create(

0 commit comments

Comments
 (0)