| 45 | } |
| 46 | |
| 47 | static inline Result<std::shared_ptr<ipc::RecordBatchFileReader>> OpenReader( |
| 48 | const FileSource& source, |
| 49 | const ipc::IpcReadOptions& options = default_read_options()) { |
| 50 | ARROW_ASSIGN_OR_RAISE(auto input, source.Open()); |
| 51 | |
| 52 | std::shared_ptr<ipc::RecordBatchFileReader> reader; |
| 53 | |
| 54 | auto status = |
| 55 | ipc::RecordBatchFileReader::Open(std::move(input), options).Value(&reader); |
| 56 | if (!status.ok()) { |
| 57 | return status.WithMessage("Could not open IPC input source '", source.path(), |
| 58 | "': ", status.message()); |
| 59 | } |
| 60 | return reader; |
| 61 | } |
| 62 | |
| 63 | static inline Future<std::shared_ptr<ipc::RecordBatchFileReader>> OpenReaderAsync( |
| 64 | const FileSource& source, |
no test coverage detected