| 1293 | } |
| 1294 | |
| 1295 | Result<std::unique_ptr<Message>> ReadMessageFromBlock( |
| 1296 | const FileBlock& block, io::RandomAccessFile* file, |
| 1297 | const FieldsLoaderFunction& fields_loader) { |
| 1298 | RETURN_NOT_OK(CheckAligned(block)); |
| 1299 | if (fields_loader) { |
| 1300 | ARROW_ASSIGN_OR_RAISE(auto message, ReadMessage(block.offset, block.metadata_length, |
| 1301 | file, fields_loader)); |
| 1302 | return CheckBodyLength(std::move(message), block); |
| 1303 | } else { |
| 1304 | ARROW_ASSIGN_OR_RAISE(auto message, ReadMessage(block.offset, block.metadata_length, |
| 1305 | block.body_length, file)); |
| 1306 | return CheckBodyLength(std::move(message), block); |
| 1307 | } |
| 1308 | } |
| 1309 | |
| 1310 | Future<std::shared_ptr<Message>> ReadMessageFromBlockAsync( |
| 1311 | const FileBlock& block, io::RandomAccessFile* file, const io::IOContext& io_context) { |
no test coverage detected