| 132 | } |
| 133 | |
| 134 | DeclarationFactory MakeWriteDeclarationFactory( |
| 135 | const WriteOptionsFactory& write_options_factory) { |
| 136 | return [&write_options_factory]( |
| 137 | acero::Declaration input, |
| 138 | std::vector<std::string> names) -> Result<acero::Declaration> { |
| 139 | std::shared_ptr<dataset::WriteNodeOptions> options = write_options_factory(); |
| 140 | if (options == nullptr) { |
| 141 | return Status::Invalid("write options factory is exhausted"); |
| 142 | } |
| 143 | return acero::Declaration::Sequence( |
| 144 | {std::move(input), {"write", std::move(*options)}}); |
| 145 | }; |
| 146 | } |
| 147 | |
| 148 | Result<std::vector<acero::Declaration>> DeserializePlans( |
| 149 | const Buffer& buf, DeclarationFactory declaration_factory, |
no test coverage detected