This is an automated email from the ASF dual-hosted git repository.
jayzhan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 5c4254aeb3 Don't implement create_sliding_accumulator repeatedly
(#11813)
5c4254aeb3 is described below
commit 5c4254aeb310731fff3fb29c95571e3db2efb41e
Author: 张林伟 <[email protected]>
AuthorDate: Mon Aug 5 22:50:40 2024 +0800
Don't implement create_sliding_accumulator repeatedly (#11813)
---
datafusion/expr/src/test/function_stub.rs | 7 -------
datafusion/functions-aggregate/src/average.rs | 7 -------
datafusion/functions-aggregate/src/bool_and_or.rs | 14 --------------
datafusion/functions-aggregate/src/regr.rs | 7 -------
4 files changed, 35 deletions(-)
diff --git a/datafusion/expr/src/test/function_stub.rs
b/datafusion/expr/src/test/function_stub.rs
index 22af84db3f..b4f768085f 100644
--- a/datafusion/expr/src/test/function_stub.rs
+++ b/datafusion/expr/src/test/function_stub.rs
@@ -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
}
diff --git a/datafusion/functions-aggregate/src/average.rs
b/datafusion/functions-aggregate/src/average.rs
index 228bce1979..288e0b09f8 100644
--- a/datafusion/functions-aggregate/src/average.rs
+++ b/datafusion/functions-aggregate/src/average.rs
@@ -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
}
diff --git a/datafusion/functions-aggregate/src/bool_and_or.rs
b/datafusion/functions-aggregate/src/bool_and_or.rs
index d002867274..b91fbb9ff7 100644
--- a/datafusion/functions-aggregate/src/bool_and_or.rs
+++ b/datafusion/functions-aggregate/src/bool_and_or.rs
@@ -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
}
@@ -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
}
diff --git a/datafusion/functions-aggregate/src/regr.rs
b/datafusion/functions-aggregate/src/regr.rs
index aad110a13e..390a769aca 100644
--- a/datafusion/functions-aggregate/src/regr.rs
+++ b/datafusion/functions-aggregate/src/regr.rs
@@ -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(
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]