| 174 | } |
| 175 | |
| 176 | Result<std::unique_ptr<substrait::Plan>> CreatePlan(std::unique_ptr<substrait::Rel> root, |
| 177 | ExtensionSet* ext_set) { |
| 178 | auto plan = std::make_unique<substrait::Plan>(); |
| 179 | plan->set_allocated_version(CreateTestVersion().release()); |
| 180 | |
| 181 | substrait::PlanRel* plan_rel = plan->add_relations(); |
| 182 | auto rel_root = std::make_unique<substrait::RelRoot>(); |
| 183 | rel_root->set_allocated_input(root.release()); |
| 184 | plan_rel->set_allocated_root(rel_root.release()); |
| 185 | |
| 186 | ARROW_RETURN_NOT_OK(AddExtensionSetToPlan(*ext_set, plan.get())); |
| 187 | return plan; |
| 188 | } |
| 189 | |
| 190 | } // namespace |
| 191 |
no test coverage detected