You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/07/20 20:36:04 UTC

[GitHub] [arrow] andygrove commented on a change in pull request #7812: ARROW-9507: [Rust] [DataFusion] Implement Display for PhysicalExpr

andygrove commented on a change in pull request #7812:
URL: https://github.com/apache/arrow/pull/7812#discussion_r457676182



##########
File path: rust/datafusion/src/execution/physical_plan/udf.rs
##########
@@ -84,6 +86,19 @@ impl ScalarFunctionExpr {
     }
 }
 
+impl fmt::Display for ScalarFunctionExpr {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        write!(f, "{}(", self.name)?;
+        for i in 0..self.args.len() {

Review comment:
       That wouldn't work but I pushed this change instead:
   
   ```rust
           write!(
               f,
               "{}({})",
               self.name,
               self.args
                   .iter()
                   .map(|e| format!("{}", e))
                   .collect::<Vec<String>>()
                   .join(", ")
           )
   ```




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org