File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 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;
2020use std:: sync:: Arc ;
2121
2222use arrow:: array:: { make_array, Array , ArrayData , ArrayRef } ;
23+ use datafusion:: logical_expr:: function:: { PartitionEvaluatorArgs , WindowUDFFieldArgs } ;
2324use datafusion:: logical_expr:: window_state:: WindowAggState ;
2425use datafusion:: scalar:: ScalarValue ;
2526use pyo3:: exceptions:: PyValueError ;
@@ -299,11 +300,21 @@ impl WindowUDFImpl for MultiColumnWindowUDF {
299300 & self . signature
300301 }
301302
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 nulalble always be `true`?
305+ Ok ( arrow:: datatypes:: Field :: new (
306+ self . name ( ) ,
307+ self . return_type . clone ( ) ,
308+ true ,
309+ ) )
304310 }
305311
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;
307318 ( self . partition_evaluator_factory ) ( )
308319 }
309320}
You can’t perform that action at this time.
0 commit comments