MCPcopy Create free account
hub / github.com/apache/arrow / GetFieldReader

Method GetFieldReader

cpp/src/parquet/arrow/reader.cc:210–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208 }
209
210 Status GetFieldReader(int i,
211 const std::shared_ptr<std::unordered_set<int>>& included_leaves,
212 const std::vector<int>& row_groups,
213 std::unique_ptr<ColumnReaderImpl>* out) {
214 // Should be covered by GetRecordBatchReader checks but
215 // manifest_.schema_fields is a separate variable so be extra careful.
216 if (ARROW_PREDICT_FALSE(i < 0 ||
217 static_cast<size_t>(i) >= manifest_.schema_fields.size())) {
218 return Status::Invalid("Column index out of bounds (got ", i,
219 ", should be "
220 "between 0 and ",
221 manifest_.schema_fields.size(), ")");
222 }
223 auto ctx = std::make_shared<ReaderContext>();
224 ctx->reader = reader_.get();
225 ctx->pool = pool_;
226 ctx->iterator_factory = SomeRowGroupsFactory(row_groups);
227 ctx->filter_leaves = true;
228 ctx->included_leaves = included_leaves;
229 ctx->reader_properties = &reader_properties_;
230 return GetReader(manifest_.schema_fields[i], ctx, out);
231 }
232
233 Status GetFieldReaders(const std::vector<int>& column_indices,
234 const std::vector<int>& row_groups,

Callers

nothing calls this directly

Calls 4

GetReaderFunction · 0.85
InvalidFunction · 0.50
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected