@@ -27,7 +27,7 @@ use std::sync::Arc;
2727use crate :: expr_fn:: binary_expr;
2828use crate :: function:: WindowFunctionSimplification ;
2929use crate :: logical_plan:: Subquery ;
30- use crate :: Volatility ;
30+ use crate :: { AggregateUDF , Volatility } ;
3131use crate :: { ExprSchemable , Operator , Signature , WindowFrame , WindowUDF } ;
3232
3333use arrow:: datatypes:: { DataType , Field , FieldRef } ;
@@ -982,7 +982,7 @@ impl<'a> TreeNodeContainer<'a, Expr> for Sort {
982982#[ derive( Clone , PartialEq , Eq , PartialOrd , Hash , Debug ) ]
983983pub struct AggregateFunction {
984984 /// Name of the function
985- pub func : Arc < crate :: AggregateUDF > ,
985+ pub func : Arc < AggregateUDF > ,
986986 pub params : AggregateFunctionParams ,
987987}
988988
@@ -1001,7 +1001,7 @@ pub struct AggregateFunctionParams {
10011001impl AggregateFunction {
10021002 /// Create a new AggregateFunction expression with a user-defined function (UDF)
10031003 pub fn new_udf (
1004- func : Arc < crate :: AggregateUDF > ,
1004+ func : Arc < AggregateUDF > ,
10051005 args : Vec < Expr > ,
10061006 distinct : bool ,
10071007 filter : Option < Box < Expr > > ,
@@ -1029,7 +1029,7 @@ impl AggregateFunction {
10291029#[ derive( Debug , Clone , PartialEq , Eq , PartialOrd , Hash ) ]
10301030pub enum WindowFunctionDefinition {
10311031 /// A user defined aggregate function
1032- AggregateUDF ( Arc < crate :: AggregateUDF > ) ,
1032+ AggregateUDF ( Arc < AggregateUDF > ) ,
10331033 /// A user defined aggregate function
10341034 WindowUDF ( Arc < WindowUDF > ) ,
10351035}
@@ -1088,8 +1088,8 @@ impl Display for WindowFunctionDefinition {
10881088 }
10891089}
10901090
1091- impl From < Arc < crate :: AggregateUDF > > for WindowFunctionDefinition {
1092- fn from ( value : Arc < crate :: AggregateUDF > ) -> Self {
1091+ impl From < Arc < AggregateUDF > > for WindowFunctionDefinition {
1092+ fn from ( value : Arc < AggregateUDF > ) -> Self {
10931093 Self :: AggregateUDF ( value)
10941094 }
10951095}
@@ -1173,38 +1173,6 @@ impl Exists {
11731173 }
11741174}
11751175
1176- /// User Defined Aggregate Function
1177- ///
1178- /// See [`crate::udaf::AggregateUDF`] for more information.
1179- #[ derive( Clone , PartialEq , Eq , Hash , Debug ) ]
1180- pub struct AggregateUDF {
1181- /// The function
1182- pub fun : Arc < crate :: AggregateUDF > ,
1183- /// List of expressions to feed to the functions as arguments
1184- pub args : Vec < Expr > ,
1185- /// Optional filter
1186- pub filter : Option < Box < Expr > > ,
1187- /// Optional ORDER BY applied prior to aggregating
1188- pub order_by : Vec < Expr > ,
1189- }
1190-
1191- impl AggregateUDF {
1192- /// Create a new AggregateUDF expression
1193- pub fn new (
1194- fun : Arc < crate :: AggregateUDF > ,
1195- args : Vec < Expr > ,
1196- filter : Option < Box < Expr > > ,
1197- order_by : Vec < Expr > ,
1198- ) -> Self {
1199- Self {
1200- fun,
1201- args,
1202- filter,
1203- order_by,
1204- }
1205- }
1206- }
1207-
12081176/// InList expression
12091177#[ derive( Clone , PartialEq , Eq , PartialOrd , Hash , Debug ) ]
12101178pub struct InList {
0 commit comments