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

Function GetPayloadSize

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

Source from the content-addressed store, hash-verified

1106}
1107
1108int64_t GetPayloadSize(const IpcPayload& payload, const IpcWriteOptions& options) {
1109 const int32_t prefix_size = options.write_legacy_ipc_format ? 4 : 8;
1110 const int32_t flatbuffer_size = static_cast<int32_t>(payload.metadata->size());
1111 const int32_t padded_message_length = static_cast<int32_t>(
1112 PaddedLength(flatbuffer_size + prefix_size, options.alignment));
1113 // body_length already accounts for padding
1114 return payload.body_length + padded_message_length;
1115}
1116
1117Status GetRecordBatchSize(const RecordBatch& batch, int64_t* size) {
1118 return GetRecordBatchSize(batch, IpcWriteOptions::Defaults(), size);

Callers 1

TestGetRecordBatchSizeFunction · 0.85

Calls 2

PaddedLengthFunction · 0.70
sizeMethod · 0.45

Tested by 1

TestGetRecordBatchSizeFunction · 0.68