| 203 | } |
| 204 | |
| 205 | Status NestedLoopJoinNode::ResetMatchingBuildRows(RuntimeState* state, int64_t num_bits) { |
| 206 | // Reuse existing bitmap, expanding it if needed. |
| 207 | if (matching_build_rows_->num_bits() >= num_bits) { |
| 208 | matching_build_rows_->SetAllBits(false); |
| 209 | } else { |
| 210 | // Account for the additional memory used by the bitmap. |
| 211 | int64_t bitmap_size_increase = |
| 212 | Bitmap::MemUsage(num_bits) - matching_build_rows_->MemUsage(); |
| 213 | if (!mem_tracker()->TryConsume(bitmap_size_increase)) { |
| 214 | return mem_tracker()->MemLimitExceeded(state, |
| 215 | "Could not expand bitmap in nested loop join", bitmap_size_increase); |
| 216 | } |
| 217 | matching_build_rows_->Reset(num_bits); |
| 218 | } |
| 219 | return Status::OK(); |
| 220 | } |
| 221 | |
| 222 | void NestedLoopJoinNode::ResetForProbe() { |
| 223 | DCHECK(build_batches_ != NULL); |
nothing calls this directly
no test coverage detected