Jefffrey commented on code in PR #18714:
URL: https://github.com/apache/datafusion/pull/18714#discussion_r2529473389
##########
datafusion/spark/src/function/string/format_string.rs:
##########
@@ -304,7 +304,7 @@ impl<'a> Formatter<'a> {
return exec_err!("No previous argument to reference");
};
let (spec, rest) =
- take_conversion_specifier(rest, p, arg_types[p -
1].clone())?;
+ take_conversion_specifier(rest, p, &arg_types[p -
1].clone())?;
Review Comment:
```suggestion
take_conversion_specifier(rest, p, &arg_types[p -
1])?;
```
##########
datafusion/spark/src/function/string/format_string.rs:
##########
@@ -335,7 +335,7 @@ impl<'a> Formatter<'a> {
let (spec, rest) = take_conversion_specifier(
rest,
current_argument_index,
- arg_types[current_argument_index - 1].clone(),
+ &arg_types[current_argument_index - 1].clone(),
Review Comment:
```suggestion
&arg_types[current_argument_index - 1],
```
No point in passing by reference if we still clone it at the callsite
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]