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