refactor: use Expr Display impl
@@ -234,12 +234,15 @@ impl fmt::Display for Predicate {
}
if !self.exprs.is_empty() {
- // Expr doesn't implement `Display` yet, so just the debug version
- // See https://github.com/apache/arrow-datafusion/issues/347
- let display_exprs = self.exprs.iter().map(|e| format!("{:?}", e));
- write!(f, " exprs: [{}]", iter_to_str(display_exprs))?;
+ write!(f, " exprs: [")?;
+ for (i, expr) in self.exprs.iter().enumerate() {
+ write!(f, "{}", expr)?;
+ if i < self.exprs.len() - 1 {
+ write!(f, " ")?;
+ }
+ }
+ write!(f, "]")?;
}
-
Ok(())
}
}
