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


##########
cpp/src/arrow/compute/exec.cc:
##########
@@ -473,7 +485,7 @@ bool ExecSpanIterator::Next(ExecSpan* span) {
 namespace {
 
 struct NullGeneralization {
-  enum type { PERHAPS_NULL, ALL_VALID, ALL_NULL };
+  enum type { PERHAPS_NULL = 0, ALL_VALID = 1, ALL_NULL = 2, INVALID = 3 };

Review Comment:
   Yes, it can be replaced by `ALL_NULL` with `ALL_NULL =3`, so we could keep 
the original `NullGeneralization::type` of each chunk when doing & operation in 
`type Get(const ChunkedArray& chunk_array)` .



##########
cpp/src/arrow/compute/exec.cc:
##########
@@ -738,12 +772,10 @@ class KernelExecutorImpl : public KernelExecutor {
     }
     for (size_t i = 0; i < data_preallocated_.size(); ++i) {
       const auto& prealloc = data_preallocated_[i];
-      if (prealloc.bit_width >= 0) {

Review Comment:
   `data_preallocated_` will be filled in ComputeDataPreallocate, and the `NA` 
type will not be added to `data_preallocated_`.



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