We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 919f9dc commit 051e33bCopy full SHA for 051e33b
1 file changed
datafusion/expr-common/src/type_coercion/aggregates.rs
@@ -232,6 +232,9 @@ pub fn avg_sum_type(arg_type: &DataType) -> Result<DataType> {
232
Ok(DataType::Decimal256(new_precision, *scale))
233
}
234
arg_type if NUMERICS.contains(arg_type) => Ok(DataType::Float64),
235
+ DataType::Duration(time_unit) => {
236
+ Ok(DataType::Duration(*time_unit))
237
+ }
238
DataType::Dictionary(_, dict_value_type) => {
239
avg_sum_type(dict_value_type.as_ref())
240
0 commit comments