@@ -22,12 +22,12 @@ use arrow::array::{
2222 MutableArrayData , NullArray , OffsetSizeTrait ,
2323} ;
2424use arrow:: buffer:: OffsetBuffer ;
25- use arrow:: datatypes:: { DataType , Field , FieldRef } ;
25+ use arrow:: datatypes:: { DataType , Field } ;
2626use datafusion_common:: utils:: SingleRowListArrayBuilder ;
2727use datafusion_common:: { plan_datafusion_err, plan_err, Result } ;
2828use datafusion_expr:: type_coercion:: binary:: comparison_coercion;
2929use datafusion_expr:: {
30- ColumnarValue , ReturnFieldArgs , ScalarFunctionArgs , ScalarUDFImpl , Signature ,
30+ ColumnarValue , ScalarFunctionArgs , ScalarUDFImpl , Signature ,
3131 TypeSignature , Volatility ,
3232} ;
3333
@@ -92,21 +92,6 @@ impl ScalarUDFImpl for SparkArray {
9292 ) ) ) )
9393 }
9494
95- fn return_field_from_args ( & self , args : ReturnFieldArgs ) -> Result < FieldRef > {
96- let data_types = args
97- . arg_fields
98- . iter ( )
99- . map ( |f| f. data_type ( ) )
100- . cloned ( )
101- . collect :: < Vec < _ > > ( ) ;
102- let return_type = self . return_type ( & data_types) ?;
103- Ok ( Arc :: new ( Field :: new (
104- "this_field_name_is_irrelevant" ,
105- return_type,
106- false ,
107- ) ) )
108- }
109-
11095 fn invoke_with_args ( & self , args : ScalarFunctionArgs ) -> Result < ColumnarValue > {
11196 let ScalarFunctionArgs { args, .. } = args;
11297 make_scalar_function ( make_array_inner) ( args. as_slice ( ) )
@@ -166,7 +151,6 @@ pub fn make_array_inner(arrays: &[ArrayRef]) -> Result<ArrayRef> {
166151 . build_list_array ( ) ,
167152 ) )
168153 }
169- DataType :: LargeList ( ..) => array_array :: < i64 > ( arrays, data_type) ,
170154 _ => array_array :: < i32 > ( arrays, data_type) ,
171155 }
172156}
0 commit comments