refactor: use Expr Display impl

pull/24376/head
Edd Robinson 2021-10-21 10:17:41 +01:00
parent f7ca80e29f
commit 3d9f9ea53e
1 changed files with 8 additions and 5 deletions

View File

@ -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(())
}
}