MCPcopy Create free account
hub / github.com/apache/arrow / MakeWriter

Method MakeWriter

cpp/src/arrow/dataset/file_ipc.cc:210–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210Result<std::shared_ptr<FileWriter>> IpcFileFormat::MakeWriter(
211 std::shared_ptr<io::OutputStream> destination, std::shared_ptr<Schema> schema,
212 std::shared_ptr<FileWriteOptions> options,
213 fs::FileLocator destination_locator) const {
214 if (!Equals(*options->format())) {
215 return Status::TypeError("Mismatching format/write options.");
216 }
217
218 auto ipc_options = checked_pointer_cast<IpcFileWriteOptions>(options);
219
220 ARROW_ASSIGN_OR_RAISE(auto writer,
221 ipc::MakeFileWriter(destination, schema, *ipc_options->options,
222 ipc_options->metadata));
223
224 return std::shared_ptr<FileWriter>(
225 new IpcFileWriter(std::move(destination), std::move(writer), std::move(schema),
226 std::move(ipc_options), std::move(destination_locator)));
227}
228
229IpcFileWriter::IpcFileWriter(std::shared_ptr<io::OutputStream> destination,
230 std::shared_ptr<ipc::RecordBatchWriter> writer,

Callers

nothing calls this directly

Calls 3

EqualsFunction · 0.70
TypeErrorFunction · 0.50
formatMethod · 0.45

Tested by

no test coverage detected