| 454 | } |
| 455 | |
| 456 | Result<std::shared_ptr<Table>> ReadTable(const liborc::RowReaderOptions& row_opts, |
| 457 | const std::shared_ptr<Schema>& schema) { |
| 458 | liborc::RowReaderOptions opts(row_opts); |
| 459 | std::vector<std::shared_ptr<RecordBatch>> batches(stripes_.size()); |
| 460 | for (size_t stripe = 0; stripe < stripes_.size(); stripe++) { |
| 461 | opts.range(static_cast<uint64_t>(stripes_[stripe].offset), |
| 462 | static_cast<uint64_t>(stripes_[stripe].length)); |
| 463 | ARROW_ASSIGN_OR_RAISE(batches[stripe], |
| 464 | ReadBatch(opts, schema, stripes_[stripe].num_rows)); |
| 465 | } |
| 466 | return Table::FromRecordBatches(schema, std::move(batches)); |
| 467 | } |
| 468 | |
| 469 | Result<std::shared_ptr<RecordBatch>> ReadBatch(const liborc::RowReaderOptions& opts, |
| 470 | const std::shared_ptr<Schema>& schema, |