Skip to content

Commit

Permalink
Using input_type rather than data_type
Browse files Browse the repository at this point in the history
  • Loading branch information
edmondop committed Jul 27, 2024
1 parent 28c1c34 commit 87e945f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions datafusion/functions-aggregate/src/min_max.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl AggregateUDFImpl for Max {

fn groups_accumulator_supported(&self, args: AccumulatorArgs) -> bool {
matches!(
args.data_type,
args.input_type,
DataType::Int8
| DataType::Int16
| DataType::Int32
Expand All @@ -187,7 +187,7 @@ impl AggregateUDFImpl for Max {
) -> Result<Box<dyn GroupsAccumulator>> {
use DataType::*;
use TimeUnit::*;
let data_type = args.data_type;
let data_type = args.input_type;
match data_type {
Int8 => instantiate_max_accumulator!(data_type, i8, Int8Type),
Int16 => instantiate_max_accumulator!(data_type, i16, Int16Type),
Expand Down Expand Up @@ -863,7 +863,7 @@ impl AggregateUDFImpl for Min {

fn groups_accumulator_supported(&self, args: AccumulatorArgs) -> bool {
matches!(
args.data_type,
args.input_type,
DataType::Int8
| DataType::Int16
| DataType::Int32
Expand All @@ -890,7 +890,7 @@ impl AggregateUDFImpl for Min {
) -> Result<Box<dyn GroupsAccumulator>> {
use DataType::*;
use TimeUnit::*;
let data_type = args.data_type;
let data_type = args.input_type;
match data_type {
Int8 => instantiate_min_accumulator!(data_type, i8, Int8Type),
Int16 => instantiate_min_accumulator!(data_type, i16, Int16Type),
Expand Down

0 comments on commit 87e945f

Please sign in to comment.