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


##########
datafusion/common/src/scalar.rs:
##########
@@ -726,6 +726,24 @@ impl ScalarValue {
         }
     }
 
+    /// whether this value is true or not.
+    pub fn is_true(&self) -> bool {
+        match self {
+            ScalarValue::Boolean(v) => v.eq(&Some(true)),
+            ScalarValue::Null => false,
+            other => panic!("Cannot apply 'IS TRUE' to arguments of type '{} 
IS TRUE'. Supported form(s): '<BOOLEAN> IS TRUE'", other)

Review Comment:
   Okay, let me know if my changes in `is_true.rs` and `is_false.rs` are what 
you had in mind.



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