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

Function WriteTable

cpp/src/arrow/ipc/feather.cc:816–833  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

814}
815
816Status WriteTable(const Table& table, io::OutputStream* dst,
817 const WriteProperties& properties) {
818 if (properties.version == kFeatherV1Version) {
819 return WriteFeatherV1(table, dst);
820 } else {
821 IpcWriteOptions ipc_options = IpcWriteOptions::Defaults();
822 ipc_options.unify_dictionaries = true;
823 ipc_options.allow_64bit = true;
824 ARROW_ASSIGN_OR_RAISE(
825 ipc_options.codec,
826 util::Codec::Create(properties.compression, properties.compression_level));
827
828 std::shared_ptr<RecordBatchWriter> writer;
829 ARROW_ASSIGN_OR_RAISE(writer, MakeFileWriter(dst, table.schema(), ipc_options));
830 RETURN_NOT_OK(writer->WriteTable(table, properties.chunksize));
831 return writer->Close();
832 }
833}
834
835} // namespace feather
836} // namespace ipc

Callers

nothing calls this directly

Calls 7

WriteFeatherV1Function · 0.85
MakeFileWriterFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.70
DefaultsFunction · 0.50
schemaMethod · 0.45
WriteTableMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected