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

Function Field__metadata

r/src/field.cpp:52–66  ·  view source on GitHub ↗

[[arrow::export]]

Source from the content-addressed store, hash-verified

50
51// [[arrow::export]]
52cpp11::writable::list Field__metadata(const std::shared_ptr<arrow::Field>& field) {
53 auto meta = field->metadata();
54 int64_t n = 0;
55 if (field->HasMetadata()) {
56 n = meta->size();
57 }
58 cpp11::writable::list out(n);
59 std::vector<std::string> names_out(n);
60 for (int i = 0; i < n; i++) {
61 out[i] = cpp11::as_sexp(meta->value(i));
62 names_out[i] = meta->key(i);
63 }
64 out.names() = names_out;
65 return out;
66}
67
68// [[arrow::export]]
69std::shared_ptr<arrow::Field> Field__WithMetadata(

Callers 1

_arrow_Field__metadataFunction · 0.85

Calls 6

as_sexpFunction · 0.85
metadataMethod · 0.45
HasMetadataMethod · 0.45
sizeMethod · 0.45
valueMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected