@@ -35,7 +35,7 @@ use datafusion_physical_expr::aggregate::{AggregateExprBuilder, AggregateFunctio
35
35
use datafusion_physical_expr:: equivalence:: collapse_lex_req;
36
36
use datafusion_physical_expr:: {
37
37
reverse_order_bys,
38
- window:: { BuiltInWindowFunctionExpr , SlidingAggregateWindowExpr } ,
38
+ window:: { SlidingAggregateWindowExpr , StandardWindowFunctionExpr } ,
39
39
ConstExpr , EquivalenceProperties , LexOrdering , PhysicalSortRequirement ,
40
40
} ;
41
41
use itertools:: Itertools ;
@@ -50,7 +50,7 @@ use datafusion_functions_window_common::field::WindowUDFFieldArgs;
50
50
use datafusion_functions_window_common:: partition:: PartitionEvaluatorArgs ;
51
51
use datafusion_physical_expr:: expressions:: Column ;
52
52
pub use datafusion_physical_expr:: window:: {
53
- BuiltInWindowExpr , PlainAggregateWindowExpr , WindowExpr ,
53
+ PlainAggregateWindowExpr , StandardWindowExpr , WindowExpr ,
54
54
} ;
55
55
use datafusion_physical_expr_common:: sort_expr:: LexRequirement ;
56
56
pub use window_agg_exec:: WindowAggExec ;
@@ -117,7 +117,7 @@ pub fn create_window_expr(
117
117
aggregate,
118
118
)
119
119
}
120
- WindowFunctionDefinition :: WindowUDF ( fun) => Arc :: new ( BuiltInWindowExpr :: new (
120
+ WindowFunctionDefinition :: WindowUDF ( fun) => Arc :: new ( StandardWindowExpr :: new (
121
121
create_udwf_window_expr ( fun, args, input_schema, name, ignore_nulls) ?,
122
122
partition_by,
123
123
order_by,
@@ -153,14 +153,14 @@ fn window_expr_from_aggregate_expr(
153
153
}
154
154
}
155
155
156
- /// Creates a `BuiltInWindowFunctionExpr ` suitable for a user defined window function
156
+ /// Creates a `StandardWindowFunctionExpr ` suitable for a user defined window function
157
157
pub fn create_udwf_window_expr (
158
158
fun : & Arc < WindowUDF > ,
159
159
args : & [ Arc < dyn PhysicalExpr > ] ,
160
160
input_schema : & Schema ,
161
161
name : String ,
162
162
ignore_nulls : bool ,
163
- ) -> Result < Arc < dyn BuiltInWindowFunctionExpr > > {
163
+ ) -> Result < Arc < dyn StandardWindowFunctionExpr > > {
164
164
// need to get the types into an owned vec for some reason
165
165
let input_types: Vec < _ > = args
166
166
. iter ( )
@@ -192,7 +192,7 @@ pub fn create_udwf_window_expr(
192
192
Ok ( udwf_expr)
193
193
}
194
194
195
- /// Implements [`BuiltInWindowFunctionExpr `] for [`WindowUDF`]
195
+ /// Implements [`StandardWindowFunctionExpr `] for [`WindowUDF`]
196
196
#[ derive( Clone , Debug ) ]
197
197
pub struct WindowUDFExpr {
198
198
fun : Arc < WindowUDF > ,
@@ -215,7 +215,7 @@ impl WindowUDFExpr {
215
215
}
216
216
}
217
217
218
- impl BuiltInWindowFunctionExpr for WindowUDFExpr {
218
+ impl StandardWindowFunctionExpr for WindowUDFExpr {
219
219
fn as_any ( & self ) -> & dyn std:: any:: Any {
220
220
self
221
221
}
@@ -244,7 +244,7 @@ impl BuiltInWindowFunctionExpr for WindowUDFExpr {
244
244
& self . name
245
245
}
246
246
247
- fn reverse_expr ( & self ) -> Option < Arc < dyn BuiltInWindowFunctionExpr > > {
247
+ fn reverse_expr ( & self ) -> Option < Arc < dyn StandardWindowFunctionExpr > > {
248
248
match self . fun . reverse_expr ( ) {
249
249
ReversedUDWF :: Identical => Some ( Arc :: new ( self . clone ( ) ) ) ,
250
250
ReversedUDWF :: NotSupported => None ,
@@ -345,10 +345,9 @@ pub(crate) fn window_equivalence_properties(
345
345
. extend ( input. equivalence_properties ( ) . clone ( ) ) ;
346
346
347
347
for expr in window_expr {
348
- if let Some ( builtin_window_expr) =
349
- expr. as_any ( ) . downcast_ref :: < BuiltInWindowExpr > ( )
348
+ if let Some ( udf_window_expr) = expr. as_any ( ) . downcast_ref :: < StandardWindowExpr > ( )
350
349
{
351
- builtin_window_expr . add_equal_orderings ( & mut window_eq_properties) ;
350
+ udf_window_expr . add_equal_orderings ( & mut window_eq_properties) ;
352
351
}
353
352
}
354
353
window_eq_properties
0 commit comments