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

Function CheckBodyLength

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

Source from the content-addressed store, hash-verified

1261
1262template <typename MessagePtr>
1263Result<MessagePtr> CheckBodyLength(MessagePtr message, const FileBlock& block) {
1264 if (message->body_length() != block.body_length) {
1265 return Status::Invalid(
1266 "Mismatching body length for IPC message "
1267 "(Block.bodyLength: ",
1268 block.body_length, " vs. Message.bodyLength: ", message->body_length(), ")");
1269 }
1270 // NOTE: we cannot check metadata length as easily as we would have to account
1271 // for the additional IPC signalisation (such as optional continuation bytes).
1272 return message;
1273}
1274
1275Result<std::unique_ptr<Message>> ReadMessageFromBlock(
1276 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