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

Function SerializeSchema

cpp/src/arrow/ipc/writer.cc:1647–1657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1645}
1646
1647Result<std::shared_ptr<Buffer>> SerializeSchema(const Schema& schema, MemoryPool* pool) {
1648 ARROW_ASSIGN_OR_RAISE(auto stream, io::BufferOutputStream::Create(1024, pool));
1649
1650 auto options = IpcWriteOptions::Defaults();
1651 const bool is_file_format = false; // indifferent as we don't write dictionaries
1652 internal::IpcFormatWriter writer(
1653 std::make_unique<internal::PayloadStreamWriter>(stream.get()), schema, options,
1654 is_file_format);
1655 RETURN_NOT_OK(writer.Start());
1656 return stream->Finish();
1657}
1658
1659} // namespace ipc
1660} // namespace arrow

Callers 8

CheckSchemaRoundtripMethod · 0.70
DoSchemaRoundTripMethod · 0.70
SchemaToStringFunction · 0.50
ReadNextMethod · 0.50
GetSchemaMetadataFunction · 0.50
Schema__serializeFunction · 0.50

Calls 4

DefaultsFunction · 0.50
getMethod · 0.45
StartMethod · 0.45
FinishMethod · 0.45

Tested by 3

CheckSchemaRoundtripMethod · 0.56
DoSchemaRoundTripMethod · 0.56