Skip to content

Commit

Permalink
Add cast to support all numeric types
Browse files Browse the repository at this point in the history
  • Loading branch information
eejbyfeldt committed Aug 23, 2024
1 parent 45c26f1 commit 525106d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion datafusion/functions-aggregate/src/variance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ impl GroupsAccumulator for VarianceGroupsAccumulator {
total_num_groups: usize,
) -> Result<()> {
assert_eq!(values.len(), 1, "single argument to update_batch");
let values = downcast_value!(values[0], Float64Array);
let values = &cast(&values[0], &DataType::Float64)?;
let values = downcast_value!(values, Float64Array);

self.resize(total_num_groups);
accumulate(group_indices, values, opt_filter, |group_index, value| {
Expand Down

0 comments on commit 525106d

Please sign in to comment.