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

Function CheckBodyLength

cpp/src/arrow/ipc/reader.cc:1283–1293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1281
1282template <typename MessagePtr>
1283Result<MessagePtr> CheckBodyLength(MessagePtr message, const FileBlock& block) {
1284 if (message->body_length() != block.body_length) {
1285 return Status::Invalid(
1286 "Mismatching body length for IPC message "
1287 "(Block.bodyLength: ",
1288 block.body_length, " vs. Message.bodyLength: ", message->body_length(), ")");
1289 }
1290 // NOTE: we cannot check metadata length as easily as we would have to account
1291 // for the additional IPC signalisation (such as optional continuation bytes).
1292 return message;
1293}
1294
1295Result<std::unique_ptr<Message>> ReadMessageFromBlock(
1296 const FileBlock& block, io::RandomAccessFile* file,

Callers 2

ReadMessageFromBlockFunction · 0.85

Calls 2

InvalidFunction · 0.50
body_lengthMethod · 0.45

Tested by

no test coverage detected