Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
  • Loading branch information
jayzhan211 committed Mar 25, 2024
1 parent cfffcbf commit 6aaa15c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ async fn test_user_defined_functions_with_alias() -> Result<()> {
vec![DataType::Float64],
Arc::new(DataType::Float64),
Volatility::Immutable,
Arc::new(|_| Ok(Box::<AvgAccumulator>::default())),
Arc::new(|_, _, _| Ok(Box::<AvgAccumulator>::default())),
Arc::new(vec![DataType::UInt64, DataType::Float64]),
)
.with_aliases(vec!["dummy_alias"]);
Expand Down
5 changes: 2 additions & 3 deletions datafusion/expr/src/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@

//! Function module contains typing and signature for built-in and user defined functions.

use crate::{Accumulator, BuiltinScalarFunction, Expr, PartitionEvaluator, Signature};
use crate::{AggregateFunction, BuiltInWindowFunction, ColumnarValue};
use crate::ColumnarValue;
use crate::{Accumulator, Expr, PartitionEvaluator};
use arrow::datatypes::{DataType, Schema};
use datafusion_common::utils::datafusion_strsim;
use datafusion_common::Result;
use std::sync::Arc;

Expand Down
9 changes: 7 additions & 2 deletions datafusion/expr/src/udaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,13 @@ impl AggregateUDFImpl for AliasedAggregateUDFImpl {
self.inner.return_type(arg_types)
}

fn accumulator(&self, arg: &DataType) -> Result<Box<dyn Accumulator>> {
self.inner.accumulator(arg)
fn accumulator(
&self,
arg: &DataType,
sort_exprs: &[Expr],
schema: &Schema,
) -> Result<Box<dyn Accumulator>> {
self.inner.accumulator(arg, sort_exprs, schema)
}

fn state_type(&self, return_type: &DataType) -> Result<Vec<DataType>> {
Expand Down

0 comments on commit 6aaa15c

Please sign in to comment.