| 1273 | } |
| 1274 | |
| 1275 | Result<std::unique_ptr<Message>> ReadMessageFromBlock( |
| 1276 | const FileBlock& block, io::RandomAccessFile* file, |
| 1277 | const FieldsLoaderFunction& fields_loader) { |
| 1278 | RETURN_NOT_OK(CheckAligned(block)); |
| 1279 | if (fields_loader) { |
| 1280 | ARROW_ASSIGN_OR_RAISE(auto message, ReadMessage(block.offset, block.metadata_length, |
| 1281 | file, fields_loader)); |
| 1282 | return CheckBodyLength(std::move(message), block); |
| 1283 | } else { |
| 1284 | ARROW_ASSIGN_OR_RAISE(auto message, ReadMessage(block.offset, block.metadata_length, |
| 1285 | block.body_length, file)); |
| 1286 | return CheckBodyLength(std::move(message), block); |
| 1287 | } |
| 1288 | } |
| 1289 | |
| 1290 | Future<std::shared_ptr<Message>> ReadMessageFromBlockAsync( |
| 1291 | const FileBlock& block, io::RandomAccessFile* file, const io::IOContext& io_context) { |
no test coverage detected