You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/07/24 20:14:35 UTC

[GitHub] [arrow-rs] tustvold commented on a diff in pull request #4566: support NullArray un arith/boolean kernel

tustvold commented on code in PR #4566:
URL: https://github.com/apache/arrow-rs/pull/4566#discussion_r1272708297


##########
arrow-arith/src/boolean.rs:
##########
@@ -332,7 +339,14 @@ pub fn is_null(input: &dyn Array) -> Result<BooleanArray, ArrowError> {
 /// ```
 pub fn is_not_null(input: &dyn Array) -> Result<BooleanArray, ArrowError> {
     let values = match input.nulls() {
-        None => BooleanBuffer::new_set(input.len()),
+        None => {
+            // NullArray has no nulls buffer yet all values are null
+            if input.data_type().equals_datatype(&DataType::Null) {

Review Comment:
   ```suggestion
               if input.data_type() == &DataType::Null {
   ```
   Could also possibly be lifted into the match expression



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