Skip to content

Commit

Permalink
Don't implement create_sliding_accumulator repeatedly (#11813)
Browse files Browse the repository at this point in the history
  • Loading branch information
lewiszlw authored Aug 5, 2024
1 parent 45d85b1 commit 5c4254a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 35 deletions.
7 changes: 0 additions & 7 deletions datafusion/expr/src/test/function_stub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,6 @@ impl AggregateUDFImpl for Sum {
unreachable!("stub should not have accumulate()")
}

fn create_sliding_accumulator(
&self,
_args: AccumulatorArgs,
) -> Result<Box<dyn Accumulator>> {
unreachable!("stub should not have accumulate()")
}

fn reverse_expr(&self) -> ReversedUDAF {
ReversedUDAF::Identical
}
Expand Down
7 changes: 0 additions & 7 deletions datafusion/functions-aggregate/src/average.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,6 @@ impl AggregateUDFImpl for Avg {
&self.aliases
}

fn create_sliding_accumulator(
&self,
args: AccumulatorArgs,
) -> Result<Box<dyn Accumulator>> {
self.accumulator(args)
}

fn reverse_expr(&self) -> ReversedUDAF {
ReversedUDAF::Identical
}
Expand Down
14 changes: 0 additions & 14 deletions datafusion/functions-aggregate/src/bool_and_or.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,6 @@ impl AggregateUDFImpl for BoolAnd {
&[]
}

fn create_sliding_accumulator(
&self,
_: AccumulatorArgs,
) -> Result<Box<dyn Accumulator>> {
Ok(Box::<BoolAndAccumulator>::default())
}

fn order_sensitivity(&self) -> AggregateOrderSensitivity {
AggregateOrderSensitivity::Insensitive
}
Expand Down Expand Up @@ -292,13 +285,6 @@ impl AggregateUDFImpl for BoolOr {
&[]
}

fn create_sliding_accumulator(
&self,
_: AccumulatorArgs,
) -> Result<Box<dyn Accumulator>> {
Ok(Box::<BoolOrAccumulator>::default())
}

fn order_sensitivity(&self) -> AggregateOrderSensitivity {
AggregateOrderSensitivity::Insensitive
}
Expand Down
7 changes: 0 additions & 7 deletions datafusion/functions-aggregate/src/regr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,6 @@ impl AggregateUDFImpl for Regr {
Ok(Box::new(RegrAccumulator::try_new(&self.regr_type)?))
}

fn create_sliding_accumulator(
&self,
_args: AccumulatorArgs,
) -> Result<Box<dyn Accumulator>> {
Ok(Box::new(RegrAccumulator::try_new(&self.regr_type)?))
}

fn state_fields(&self, args: StateFieldsArgs) -> Result<Vec<Field>> {
Ok(vec![
Field::new(
Expand Down

0 comments on commit 5c4254a

Please sign in to comment.