Skip to content

Commit 051e33b

Browse files
committed
support duration return type
1 parent 919f9dc commit 051e33b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

datafusion/expr-common/src/type_coercion/aggregates.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ pub fn avg_sum_type(arg_type: &DataType) -> Result<DataType> {
232232
Ok(DataType::Decimal256(new_precision, *scale))
233233
}
234234
arg_type if NUMERICS.contains(arg_type) => Ok(DataType::Float64),
235+
DataType::Duration(time_unit) => {
236+
Ok(DataType::Duration(*time_unit))
237+
}
235238
DataType::Dictionary(_, dict_value_type) => {
236239
avg_sum_type(dict_value_type.as_ref())
237240
}

0 commit comments

Comments
 (0)