File tree 1 file changed +14
-3
lines changed
1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ use std::ops::Range;
20
20
use std:: sync:: Arc ;
21
21
22
22
use arrow:: array:: { make_array, Array , ArrayData , ArrayRef } ;
23
+ use datafusion:: logical_expr:: function:: { PartitionEvaluatorArgs , WindowUDFFieldArgs } ;
23
24
use datafusion:: logical_expr:: window_state:: WindowAggState ;
24
25
use datafusion:: scalar:: ScalarValue ;
25
26
use pyo3:: exceptions:: PyValueError ;
@@ -299,11 +300,21 @@ impl WindowUDFImpl for MultiColumnWindowUDF {
299
300
& self . signature
300
301
}
301
302
302
- fn return_type ( & self , _arg_types : & [ DataType ] ) -> Result < DataType > {
303
- Ok ( self . return_type . clone ( ) )
303
+ fn field ( & self , field_args : WindowUDFFieldArgs ) -> Result < arrow:: datatypes:: Field > {
304
+ // TODO: Should nullable always be `true`?
305
+ Ok ( arrow:: datatypes:: Field :: new (
306
+ field_args. name ( ) ,
307
+ self . return_type . clone ( ) ,
308
+ true ,
309
+ ) )
304
310
}
305
311
306
- fn partition_evaluator ( & self ) -> Result < Box < dyn PartitionEvaluator > > {
312
+ // TODO: Enable passing partition_evaluator_args to python?
313
+ fn partition_evaluator (
314
+ & self ,
315
+ _partition_evaluator_args : PartitionEvaluatorArgs ,
316
+ ) -> Result < Box < dyn PartitionEvaluator > > {
317
+ let _ = _partition_evaluator_args;
307
318
( self . partition_evaluator_factory ) ( )
308
319
}
309
320
}
You can’t perform that action at this time.
0 commit comments