| 51 | ordering_(std::move(new_ordering)) {} |
| 52 | |
| 53 | static Result<ExecNode*> Make(ExecPlan* plan, std::vector<ExecNode*> inputs, |
| 54 | const ExecNodeOptions& options) { |
| 55 | RETURN_NOT_OK(ValidateExecNodeInputs(plan, inputs, 1, "FetchNode")); |
| 56 | |
| 57 | const auto& order_options = checked_cast<const OrderByNodeOptions&>(options); |
| 58 | |
| 59 | if (order_options.ordering.is_implicit() || order_options.ordering.is_unordered()) { |
| 60 | return Status::Invalid("`ordering` must be an explicit non-empty ordering"); |
| 61 | } |
| 62 | |
| 63 | std::shared_ptr<Schema> output_schema = inputs[0]->output_schema(); |
| 64 | return plan->EmplaceNode<OrderByNode>( |
| 65 | plan, std::move(inputs), std::move(output_schema), order_options.ordering); |
| 66 | } |
| 67 | |
| 68 | const char* kind_name() const override { return "OrderByNode"; } |
| 69 |
nothing calls this directly
no test coverage detected