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


##########
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)),

Review Comment:
   We can make more use of pattern matching here:
   
   ```suggestion
               ScalarValue::Boolean(&Some(true)) => true,
   ```



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