| 984 | } |
| 985 | |
| 986 | Status 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 | |
| 1001 | Sorter::Sorter(const TupleRowComparatorConfig& tuple_row_comparator_config, |
| 1002 | const vector<ScalarExpr*>& sort_tuple_exprs, RowDescriptor* output_row_desc, |
no test coverage detected