@@ -24,7 +24,7 @@ use arrow_schema::DataType::{FixedSizeList, LargeList, List};
24
24
use datafusion_common:: cast:: as_list_array;
25
25
use datafusion_common:: exec_err;
26
26
use datafusion_doc:: Documentation ;
27
- use datafusion_expr:: { ColumnarValue , Expr , ScalarUDFImpl , Signature , Volatility } ;
27
+ use datafusion_expr:: { ColumnarValue , ScalarUDFImpl , Signature , Volatility } ;
28
28
use datafusion_macros:: user_doc;
29
29
use std:: any:: Any ;
30
30
use std:: sync:: Arc ;
@@ -84,27 +84,6 @@ impl ScalarUDFImpl for ArrayMax {
84
84
"array_max"
85
85
}
86
86
87
- fn display_name ( & self , args : & [ Expr ] ) -> datafusion_common:: Result < String > {
88
- let args_name = args. iter ( ) . map ( ToString :: to_string) . collect :: < Vec < _ > > ( ) ;
89
- if args_name. len ( ) != 1 {
90
- return exec_err ! ( "expects 1 arg, got {}" , args_name. len( ) ) ;
91
- }
92
-
93
- Ok ( format ! ( "{}" , args_name[ 0 ] ) )
94
- }
95
-
96
- fn schema_name ( & self , args : & [ Expr ] ) -> datafusion_common:: Result < String > {
97
- let args_name = args
98
- . iter ( )
99
- . map ( |e| e. schema_name ( ) . to_string ( ) )
100
- . collect :: < Vec < _ > > ( ) ;
101
- if args_name. len ( ) != 1 {
102
- return exec_err ! ( "expects 1 arg, got {}" , args_name. len( ) ) ;
103
- }
104
-
105
- Ok ( format ! ( "{}" , args_name[ 0 ] ) )
106
- }
107
-
108
87
fn signature ( & self ) -> & Signature {
109
88
& self . signature
110
89
}
@@ -152,7 +131,7 @@ pub fn array_max_inner(args: &[ArrayRef]) -> datafusion_common::Result<ArrayRef>
152
131
match & args[ 0 ] . data_type ( ) {
153
132
List ( _) | LargeList ( _) | FixedSizeList ( _, _) => {
154
133
let new_args = vec ! [
155
- args[ 0 ] . clone ( ) ,
134
+ Arc :: <dyn Array > :: clone ( & args[ 0 ] ) ,
156
135
Arc :: new( StringArray :: from_iter( vec![ Some ( "DESC" ) ] ) ) ,
157
136
Arc :: new( StringArray :: from_iter( vec![ Some ( "NULLS LAST" ) ] ) ) ,
158
137
] ;
0 commit comments