devinjdangelo commented on code in PR #7291:
URL: https://github.com/apache/arrow-datafusion/pull/7291#discussion_r1296540850
##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -1100,15 +1100,13 @@ impl LogicalPlan {
options,
}) => {
let mut op_str = String::new();
- op_str.push('(');
for (key, val) in options {
if !op_str.is_empty() {
- op_str.push(',');
+ op_str.push_str(", ");
}
op_str.push_str(&format!("{key} {val}"));
}
- op_str.push(')');
- write!(f, "CopyTo: format={file_format}
output_url={output_url} per_thread_output={per_thread_output} options:
{op_str}")
+ write!(f, "CopyTo: format={file_format}
output_url={output_url} per_thread_output={per_thread_output} options:
({op_str})")
Review Comment:
I also reworked this function in #7294 like so:
https://github.com/apache/arrow-datafusion/blob/429d0f0bb586bd9a20809faa4e3715e9586427f8/datafusion/expr/src/logical_plan/plan.rs#L1095-L1109
This version is less efficient as it loops over the values twice, but this
is also not performance sensitive code so the tradeoff for readability maybe
makes sense.
--
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]