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

Function WriteTable

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

Source from the content-addressed store, hash-verified

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

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