alamb commented on code in PR #15921: URL: https://github.com/apache/datafusion/pull/15921#discussion_r2072077763
########## datafusion/spark/src/function/utils.rs: ########## @@ -67,7 +69,12 @@ pub mod test { let return_field = return_field.unwrap(); assert_eq!(return_field.data_type(), &$EXPECTED_DATA_TYPE); - let result = func.invoke_with_args(datafusion_expr::ScalarFunctionArgs{args: $ARGS, number_rows: cardinality, return_field: &return_field, arg_fields: arg_fields_owned.iter().collect()}); + let result = func.invoke_with_args(datafusion_expr::ScalarFunctionArgs{ + args: $ARGS, + number_rows: cardinality, + return_field: &return_field, + arg_fields: arg_fields.clone(), Review Comment: in particular the change is to avoid calling `collect` twice and instead create the vec once and reuse it -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org