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

Method Sort

be/src/runtime/sorter.cc:986–999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

984}
985
986Status Sorter::TupleSorter::Sort(Run* run) {
987 DCHECK(run->is_finalized());
988 DCHECK(!run->is_sorted());
989 run_ = run;
990 const SortHelperFn sort_helper_fn = parent_->codegend_sort_helper_fn_.load();
991 if (sort_helper_fn != nullptr) {
992 RETURN_IF_ERROR(
993 sort_helper_fn(this, TupleIterator::Begin(run_), TupleIterator::End(run_)));
994 } else {
995 RETURN_IF_ERROR(SortHelper(TupleIterator::Begin(run_), TupleIterator::End(run_)));
996 }
997 run_->set_sorted();
998 return Status::OK();
999}
1000
1001Sorter::Sorter(const TupleRowComparatorConfig& tuple_row_comparator_config,
1002 const vector<ScalarExpr*>& sort_tuple_exprs, RowDescriptor* output_row_desc,

Callers 1

SortCurrentInputRunMethod · 0.80

Calls 5

OKFunction · 0.85
is_finalizedMethod · 0.80
set_sortedMethod · 0.80
is_sortedMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected