From 3d9f9ea53e0b1762278c5496b185021b32241ea3 Mon Sep 17 00:00:00 2001 From: Edd Robinson Date: Thu, 21 Oct 2021 10:17:41 +0100 Subject: [PATCH] refactor: use Expr Display impl --- predicate/src/predicate.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/predicate/src/predicate.rs b/predicate/src/predicate.rs index d7f3b624b3..cc7c590c21 100644 --- a/predicate/src/predicate.rs +++ b/predicate/src/predicate.rs @@ -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(()) } }