MCPcopy Create free account
hub / github.com/apache/impala / RematerializeTuplesHelper

Method RematerializeTuplesHelper

be/src/exec/topn-node.cc:761–775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

759
760template <class T>
761Status 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
777Status TopNNode::Heap::RematerializeTuples(TopNNode* node,
778 RuntimeState* state, MemPool* new_pool) {

Callers

nothing calls this directly

Calls 6

OKFunction · 0.85
byte_sizeMethod · 0.45
TryAllocateMethod · 0.45
MemLimitExceededMethod · 0.45
mem_trackerMethod · 0.45
DeepCopyMethod · 0.45

Tested by

no test coverage detected