ZhangHuiGui commented on code in PR #41975:
URL: https://github.com/apache/arrow/pull/41975#discussion_r1637545833


##########
cpp/src/arrow/compute/exec.cc:
##########
@@ -498,15 +510,37 @@ struct NullGeneralization {
     return PERHAPS_NULL;
   }
 
+  static type Get(const ChunkedArray& chunk_array) {
+    if (chunk_array.num_chunks() == 0) {
+      return ALL_VALID;
+    }
+    if (chunk_array.null_count() == chunk_array.length()) {
+      return ALL_NULL;
+    }
+
+    for (const auto& chunk : chunk_array.chunks()) {
+      ExecValue value;
+      value.SetArray(*chunk->data());
+      auto null_gen = Get(value);
+      if (null_gen == ALL_NULL || null_gen == PERHAPS_NULL) {

Review Comment:
   We have checked `ALL_NULL` before, so if we met one ALL_NULL for one chunk, 
we should return `PERHAPS_NULL` also.



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