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

Method GetColumn

cpp/src/arrow/ipc/feather.cc:328–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326 }
327
328 Status GetColumn(int field_index, std::shared_ptr<ChunkedArray>* out) {
329 const fbs::Column* col_meta = metadata_->columns()->Get(field_index);
330 std::shared_ptr<ArrayData> data;
331
332 auto type = schema_->field(field_index)->type();
333 RETURN_NOT_OK(LoadValues(type, col_meta->values(), col_meta->metadata_type(),
334 col_meta->metadata(), &data));
335
336 if (type->id() == Type::DICTIONARY) {
337 RETURN_NOT_OK(GetDictionary(field_index, &data->dictionary));
338 data->type = type;
339 }
340 *out = std::make_shared<ChunkedArray>(MakeArray(data));
341 return Status::OK();
342 }
343
344 Status Read(std::shared_ptr<Table>* out) override {
345 std::vector<std::shared_ptr<ChunkedArray>> columns;

Callers

nothing calls this directly

Calls 9

columnsMethod · 0.80
MakeArrayFunction · 0.50
OKFunction · 0.50
GetMethod · 0.45
typeMethod · 0.45
fieldMethod · 0.45
valuesMethod · 0.45
metadataMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected