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

Method GetFieldReader

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

Source from the content-addressed store, hash-verified

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