sarahyurick commented on code in PR #3301:
URL: https://github.com/apache/arrow-datafusion/pull/3301#discussion_r958973272


##########
datafusion/physical-expr/src/planner.rs:
##########
@@ -83,6 +83,84 @@ pub fn create_physical_expr(
                 }
             }
         }
+        Expr::IsTrue(expr) => {
+            let binary_op = binary_expr(
+                expr.as_ref().clone(),
+                Operator::IsNotDistinctFrom,
+                Expr::Literal(ScalarValue::Boolean(Some(true))),

Review Comment:
   Cool!
   
   One thing is that when we pass in something other than a boolean (like a 
number) with something like `SELECT 2 IS TRUE as t`, we get an error that looks 
like `Error: Plan("'Int64 IS NOT DISTINCT FROM Boolean' can't be evaluated 
because there isn't a common type to coerce the types to")`. While this 
generally looks like the desired error, the `IS NOT DISTINCT FROM` might be a 
little confusing from the user's POV.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to