File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ impl ScalarUDFImpl for NamedStructFunc {
185185 & self ,
186186 literal_args : & [ Option < ScalarValue > ] ,
187187 ) -> Option < StructFieldMapping > {
188- if literal_args. is_empty ( ) || literal_args. len ( ) % 2 != 0 {
188+ if literal_args. is_empty ( ) || ! literal_args. len ( ) . is_multiple_of ( 2 ) {
189189 return None ;
190190 }
191191
Original file line number Diff line number Diff line change @@ -641,7 +641,7 @@ impl ProjectionMapping {
641641 None => Ok ( Transformed :: no ( e) ) ,
642642 } )
643643 . data ( ) ?;
644- map. entry ( source_expr . clone ( ) )
644+ map. entry ( Arc :: clone ( & source_expr ) )
645645 . or_default ( )
646646 . push ( ( Arc :: clone ( & target_expr) , expr_idx) ) ;
647647
@@ -670,7 +670,8 @@ impl ProjectionMapping {
670670 {
671671 if let DataType :: Struct ( struct_fields) = func_expr. return_type ( ) {
672672 for ( accessor_args, source_arg_idx) in & field_mapping. fields {
673- let value_expr = func_expr. args ( ) [ * source_arg_idx] . clone ( ) ;
673+ let value_expr =
674+ Arc :: clone ( & func_expr. args ( ) [ * source_arg_idx] ) ;
674675
675676 // Build accessor args: [target_col, ...field_name_literals]
676677 let mut accessor_fn_args: Vec < Arc < dyn PhysicalExpr > > =
You can’t perform that action at this time.
0 commit comments