| 100 | : contents_(std::move(contents)) {} |
| 101 | |
| 102 | std::shared_ptr<ColumnReader> RowGroupReader::Column(int i) { |
| 103 | if (i >= metadata()->num_columns()) { |
| 104 | std::stringstream ss; |
| 105 | ss << "Trying to read column index " << i << " but row group metadata has only " |
| 106 | << metadata()->num_columns() << " columns"; |
| 107 | throw ParquetException(ss.str()); |
| 108 | } |
| 109 | const ColumnDescriptor* descr = metadata()->schema()->Column(i); |
| 110 | |
| 111 | std::unique_ptr<PageReader> page_reader = contents_->GetColumnPageReader(i); |
| 112 | return ColumnReader::Make( |
| 113 | descr, std::move(page_reader), |
| 114 | const_cast<ReaderProperties*>(contents_->properties())->memory_pool()); |
| 115 | } |
| 116 | |
| 117 | std::shared_ptr<internal::RecordReader> RowGroupReader::RecordReader( |
| 118 | int i, bool read_dictionary) { |
no test coverage detected