| 256 | } |
| 257 | |
| 258 | Status NljBuilder::DeepCopyBuildBatches(RuntimeState* state) { |
| 259 | for (RowBatchList::BatchIterator it = input_build_batches_.BatchesBegin(); |
| 260 | it != input_build_batches_.BatchesEnd(); ++it) { |
| 261 | RowBatch* input_batch = *it; |
| 262 | // TODO: it would be more efficient to do the deep copy within the same batch, rather |
| 263 | // than to a new batch. |
| 264 | RowBatch* copied_batch = build_batch_cache_.GetNextBatch(mem_tracker()); |
| 265 | input_batch->DeepCopyTo(copied_batch); |
| 266 | copied_build_batches_.AddRowBatch(copied_batch); |
| 267 | // Reset input batches as we go to free up memory if possible. |
| 268 | input_batch->Reset(); |
| 269 | |
| 270 | RETURN_IF_CANCELLED(state); |
| 271 | RETURN_IF_ERROR(state->CheckQueryState()); |
| 272 | } |
| 273 | input_build_batches_.Reset(); |
| 274 | return Status::OK(); |
| 275 | } |
| 276 | |
| 277 | void NljBuilder::AllocateRuntimeFilters() { |
| 278 | for (int i = 0; i < filter_ctxs_.size(); ++i) { |
nothing calls this directly
no test coverage detected