| 370 | } |
| 371 | |
| 372 | bool IcebergDeleteNode::NeedToCheckBatch(const RoaringBitmap64& deletes) { |
| 373 | DCHECK_GE(probe_batch_pos_, 0); |
| 374 | if (deletes.IsEmpty()) return false; |
| 375 | |
| 376 | TupleRow* first_row = probe_batch_->GetRow(probe_batch_pos_); |
| 377 | int64_t* first_row_pos = first_row->GetTuple(0)->GetBigIntSlot(pos_offset_); |
| 378 | |
| 379 | if (*first_row_pos > deletes.Max()) return false; |
| 380 | |
| 381 | TupleRow* last_row = probe_batch_->GetRow(probe_batch_->num_rows() - 1); |
| 382 | int64_t* last_row_pos = last_row->GetTuple(0)->GetBigIntSlot(pos_offset_); |
| 383 | |
| 384 | if (*last_row_pos < deletes.Min()) return false; |
| 385 | |
| 386 | return true; |
| 387 | } |
| 388 | |
| 389 | } // namespace impala |