| 611 | } |
| 612 | |
| 613 | Status PropagateMultiple() { |
| 614 | // More than one array. We use BitmapAnd to intersect their bitmaps |
| 615 | |
| 616 | // Do not compute the intersection null count until it's needed |
| 617 | RETURN_NOT_OK(EnsureAllocated()); |
| 618 | |
| 619 | auto Accumulate = [&](const uint8_t* left_data, int64_t left_offset, |
| 620 | const uint8_t* right_data, int64_t right_offset) { |
| 621 | BitmapAnd(left_data, left_offset, right_data, right_offset, output_->length, |
| 622 | output_->offset, bitmap_); |
| 623 | }; |
| 624 | |
| 625 | DCHECK_GT(arrays_with_nulls_.size(), 1); |
| 626 | |
| 627 | // Seed the output bitmap with the & of the first two bitmaps |
| 628 | Accumulate(arrays_with_nulls_[0]->buffers[0].data, arrays_with_nulls_[0]->offset, |
| 629 | arrays_with_nulls_[1]->buffers[0].data, arrays_with_nulls_[1]->offset); |
| 630 | |
| 631 | // Accumulate the rest |
| 632 | for (size_t i = 2; i < arrays_with_nulls_.size(); ++i) { |
| 633 | Accumulate(bitmap_, output_->offset, arrays_with_nulls_[i]->buffers[0].data, |
| 634 | arrays_with_nulls_[i]->offset); |
| 635 | } |
| 636 | return Status::OK(); |
| 637 | } |
| 638 | |
| 639 | Status Execute() { |
| 640 | if (is_all_null_) { |
nothing calls this directly
no test coverage detected