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/09/14 03:34:23 UTC

[GitHub] [arrow] jorgecarleitao opened a new pull request #8183: ARROW-9990: [Rust] [DataFusion] Fixed the NOT operator

jorgecarleitao opened a new pull request #8183:
URL: https://github.com/apache/arrow/pull/8183


   This PR is built on top of #8182


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



[GitHub] [arrow] alamb commented on a change in pull request #8183: ARROW-9990: [Rust] [DataFusion] Fixed the NOT operator

Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #8183:
URL: https://github.com/apache/arrow/pull/8183#discussion_r491184205



##########
File path: rust/datafusion/src/sql/planner.rs
##########
@@ -493,16 +493,11 @@ impl<'a, S: SchemaProvider> SqlToRel<'a, S> {
                     ))),
                 }?;
 
-                match operator {
-                    Operator::Not => Err(ExecutionError::InternalError(format!(
-                        "SQL unary operator \"NOT\" cannot be interpreted as a binary operator"
-                    ))),
-                    _ => Ok(Expr::BinaryExpr {
-                        left: Box::new(self.sql_to_rex(&left, &schema)?),
-                        op: operator,
-                        right: Box::new(self.sql_to_rex(&right, &schema)?),
-                    })
-                }
+                Ok(Expr::BinaryExpr {

Review comment:
       👍 




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



[GitHub] [arrow] jhorstmann commented on pull request #8183: ARROW-9990: [Rust] [DataFusion] Fixed the NOT operator

Posted by GitBox <gi...@apache.org>.
jhorstmann commented on pull request #8183:
URL: https://github.com/apache/arrow/pull/8183#issuecomment-693295386


   LGTM


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



[GitHub] [arrow] jhorstmann commented on a change in pull request #8183: ARROW-9990: [Rust] [DataFusion] Fixed the NOT operator

Posted by GitBox <gi...@apache.org>.
jhorstmann commented on a change in pull request #8183:
URL: https://github.com/apache/arrow/pull/8183#discussion_r489300959



##########
File path: rust/datafusion/src/physical_plan/expressions.rs
##########
@@ -1306,18 +1295,11 @@ impl PhysicalExpr for NotExpr {
     }
 
     fn nullable(&self, _input_schema: &Schema) -> Result<bool> {
-        // !Null == true
-        Ok(false)
+        Ok(true)

Review comment:
       Should we return `arg.nullable()` here?




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



[GitHub] [arrow] jorgecarleitao commented on a change in pull request #8183: ARROW-9990: [Rust] [DataFusion] Fixed the NOT operator

Posted by GitBox <gi...@apache.org>.
jorgecarleitao commented on a change in pull request #8183:
URL: https://github.com/apache/arrow/pull/8183#discussion_r489537470



##########
File path: rust/datafusion/src/physical_plan/expressions.rs
##########
@@ -1306,18 +1295,11 @@ impl PhysicalExpr for NotExpr {
     }
 
     fn nullable(&self, _input_schema: &Schema) -> Result<bool> {
-        // !Null == true
-        Ok(false)
+        Ok(true)

Review comment:
       done. :)




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



[GitHub] [arrow] andygrove closed pull request #8183: ARROW-9990: [Rust] [DataFusion] Fixed the NOT operator

Posted by GitBox <gi...@apache.org>.
andygrove closed pull request #8183:
URL: https://github.com/apache/arrow/pull/8183


   


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



[GitHub] [arrow] github-actions[bot] commented on pull request #8183: ARROW-9990: [Rust] [DataFusion] Fixed the NOT operator

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #8183:
URL: https://github.com/apache/arrow/pull/8183#issuecomment-691794088


   https://issues.apache.org/jira/browse/ARROW-9990


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



[GitHub] [arrow] jorgecarleitao commented on a change in pull request #8183: ARROW-9990: [Rust] [DataFusion] Fixed the NOT operator

Posted by GitBox <gi...@apache.org>.
jorgecarleitao commented on a change in pull request #8183:
URL: https://github.com/apache/arrow/pull/8183#discussion_r489311064



##########
File path: rust/datafusion/src/physical_plan/expressions.rs
##########
@@ -1306,18 +1295,11 @@ impl PhysicalExpr for NotExpr {
     }
 
     fn nullable(&self, _input_schema: &Schema) -> Result<bool> {
-        // !Null == true
-        Ok(false)
+        Ok(true)

Review comment:
       Yes, good catch!




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