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 2022/06/29 22:28:02 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #2815: Fix `ScalarValue::isNull` calculation

alamb commented on code in PR #2815:
URL: https://github.com/apache/arrow-datafusion/pull/2815#discussion_r910460596


##########
datafusion/common/src/scalar.rs:
##########
@@ -625,32 +625,36 @@ impl ScalarValue {
 
     /// whether this value is null or not.
     pub fn is_null(&self) -> bool {
-        matches!(
-            *self,
-            ScalarValue::Null

Review Comment:
   You can see there are several types that are not covered (`ScalarValue::Binary` was what triggered an error). However, there was similar issues for `Interval`, etc
   
   I have changed the code to use a `match` so if new variants of `ScalarValue` are added, this list will also need to be updated. 



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org