16 #ifndef IMPALA_RUNTIME_SORTED_RUN_MERGER_H_
17 #define IMPALA_RUNTIME_SORTED_RUN_MERGER_H_
19 #include <boost/scoped_ptr.hpp>
20 #include <boost/thread/mutex.hpp>
55 Status Prepare(
const std::vector<RunBatchSupplier>& input_runs);
RuntimeProfile::Counter * get_next_timer_
Times calls to GetNext().
void Heapify(int parent_index)
std::vector< BatchedRowSupplier * > min_heap_
Status GetNext(RowBatch *output_batch, bool *eos)
Return the next batch of sorted rows from this merger.
boost::function< Status(RowBatch **)> RunBatchSupplier
ObjectPool pool_
Pool of BatchedRowSupplier instances.
Status Prepare(const std::vector< RunBatchSupplier > &input_runs)
const RowDescriptor & row_desc() const
RuntimeProfile::Counter * get_next_batch_timer_
Times calls to get the next batch of rows from the input run.
SortedRunMerger(const TupleRowComparator &compare_less_than, RowDescriptor *row_desc, RuntimeProfile *profile, bool deep_copy_input)
bool deep_copy_input_
True if rows must be deep copied into the output batch.
TupleRowComparator compare_less_than_
Row comparator. Returns true if lhs < rhs.
RowDescriptor * input_row_desc_
void TransferAllResources(RowBatch *transfer_resource_batch)