nirandaperera commented on a change in pull request #10487:
URL: https://github.com/apache/arrow/pull/10487#discussion_r655697111
##########
File path: cpp/src/arrow/compute/kernels/scalar_if_else.cc
##########
@@ -72,18 +72,6 @@ Status PromoteNullsVisitor(KernelContext* ctx, const Datum&
cond_d, const Datum&
Bitmap cond_valid{cond.buffers[0], cond.offset, cond.length};
Bitmap left_valid = GetBitmap(left_d, 0);
Bitmap right_valid = GetBitmap(right_d, 0);
- // sometimes Bitmaps will be ignored, in which case we replace access to
them with
- // duplicated (probably elided) access to cond_data
- const Bitmap& _ = cond_data;
-
- // lambda function that will be used inside the visitor
- uint64_t* out_validity = nullptr;
- int64_t i = 0;
- auto apply = [&](uint64_t c_valid, uint64_t c_data, uint64_t l_valid,
- uint64_t r_valid) {
- out_validity[i] = c_valid & ((c_data & l_valid) | (~c_data & r_valid));
- i++;
- };
// cond.valid & (cond.data & left.valid | ~cond.data & right.valid)
// In the following cases, we dont need to allocate out_valid bitmap
Review comment:
@bkietz I have added the changes required. Could you please review the
changes?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]