You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ag...@apache.org on 2020/05/16 20:20:47 UTC

[arrow] branch master updated: ARROW-8821: [Rust] fix type cast for nested binary expression using Like, NotLike, Not operators

This is an automated email from the ASF dual-hosted git repository.

agrove pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 921af31  ARROW-8821: [Rust] fix type cast for nested binary expression using Like, NotLike, Not operators
921af31 is described below

commit 921af31c75674e60d615c9c815c60601f1c9ed54
Author: Qingping Hou <da...@gmail.com>
AuthorDate: Sat May 16 14:20:20 2020 -0600

    ARROW-8821: [Rust] fix type cast for nested binary expression using Like, NotLike, Not operators
    
    Without this change, nested binary expressions are casted into Utf8, which results in general DataFusionError.
    
    Closes #7200 from houqp/qp
    
    Authored-by: Qingping Hou <da...@gmail.com>
    Signed-off-by: Andy Grove <an...@gmail.com>
---
 rust/datafusion/src/logicalplan.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/rust/datafusion/src/logicalplan.rs b/rust/datafusion/src/logicalplan.rs
index 40dd64e..9dcbeba 100644
--- a/rust/datafusion/src/logicalplan.rs
+++ b/rust/datafusion/src/logicalplan.rs
@@ -260,6 +260,8 @@ impl Expr {
                 ref right,
                 ref op,
             } => match op {
+                Operator::Not => Ok(DataType::Boolean),
+                Operator::Like | Operator::NotLike => Ok(DataType::Boolean),
                 Operator::Eq | Operator::NotEq => Ok(DataType::Boolean),
                 Operator::Lt | Operator::LtEq => Ok(DataType::Boolean),
                 Operator::Gt | Operator::GtEq => Ok(DataType::Boolean),