| 105 | } |
| 106 | |
| 107 | void SortPlanNode::Codegen(FragmentState* state) { |
| 108 | DCHECK(state->ShouldCodegen()); |
| 109 | PlanNode::Codegen(state); |
| 110 | if (IsNodeCodegenDisabled()) return; |
| 111 | llvm::Function* compare_fn = nullptr; |
| 112 | Status codegen_status = row_comparator_config_->Codegen(state, &compare_fn); |
| 113 | if (codegen_status.ok()) { |
| 114 | codegen_status = |
| 115 | Sorter::TupleSorter::Codegen(state, compare_fn, |
| 116 | row_descriptor_->tuple_descriptors()[0]->byte_size(), |
| 117 | &codegend_sort_helper_fn_); |
| 118 | } |
| 119 | if (codegen_status.ok()) { |
| 120 | codegen_status = |
| 121 | SortedRunMerger::Codegen(state, compare_fn, &codegend_heapify_helper_fn_); |
| 122 | } |
| 123 | AddCodegenStatus(codegen_status); |
| 124 | } |
| 125 | |
| 126 | Status SortNode::Open(RuntimeState* state) { |
| 127 | SCOPED_TIMER(runtime_profile_->total_time_counter()); |
nothing calls this directly
no test coverage detected