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

Function WriteTable

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

Source from the content-addressed store, hash-verified

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