| 85 | sequencing_queue_(util::SequencingQueue::Make(this)) {} |
| 86 | |
| 87 | static Result<ExecNode*> Make(ExecPlan* plan, std::vector<ExecNode*> inputs, |
| 88 | const ExecNodeOptions& options) { |
| 89 | RETURN_NOT_OK(ValidateExecNodeInputs(plan, inputs, 1, "FetchNode")); |
| 90 | |
| 91 | const auto& fetch_options = checked_cast<const FetchNodeOptions&>(options); |
| 92 | |
| 93 | int64_t offset = fetch_options.offset; |
| 94 | int64_t count = fetch_options.count; |
| 95 | |
| 96 | if (offset < 0) { |
| 97 | return Status::Invalid("`offset` must be non-negative"); |
| 98 | } |
| 99 | if (count < 0) { |
| 100 | return Status::Invalid("`count` must be non-negative"); |
| 101 | } |
| 102 | |
| 103 | std::shared_ptr<Schema> output_schema = inputs[0]->output_schema(); |
| 104 | return plan->EmplaceNode<FetchNode>(plan, std::move(inputs), std::move(output_schema), |
| 105 | offset, count); |
| 106 | } |
| 107 | |
| 108 | const char* kind_name() const override { return "FetchNode"; } |
| 109 |
nothing calls this directly
no test coverage detected