| 759 | |
| 760 | template <class T> |
| 761 | Status TopNNode::Heap::RematerializeTuplesHelper(TopNNode* node, |
| 762 | RuntimeState* state, MemPool* new_pool, T begin_it, T end_it) { |
| 763 | const TupleDescriptor& tuple_desc = *node->output_tuple_desc_; |
| 764 | int tuple_size = tuple_desc.byte_size(); |
| 765 | for (T it = begin_it; it != end_it; ++it) { |
| 766 | Tuple* insert_tuple = reinterpret_cast<Tuple*>(new_pool->TryAllocate(tuple_size)); |
| 767 | if (UNLIKELY(insert_tuple == nullptr)) { |
| 768 | return new_pool->mem_tracker()->MemLimitExceeded(state, |
| 769 | "Failed to allocate memory in TopNNode::ReclaimTuplePool.", tuple_size); |
| 770 | } |
| 771 | (*it)->DeepCopy(insert_tuple, tuple_desc, new_pool); |
| 772 | *it = insert_tuple; |
| 773 | } |
| 774 | return Status::OK(); |
| 775 | } |
| 776 | |
| 777 | Status TopNNode::Heap::RematerializeTuples(TopNNode* node, |
| 778 | RuntimeState* state, MemPool* new_pool) { |
nothing calls this directly
no test coverage detected