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

Function Field__WithMetadata

r/src/field.cpp:69–76  ·  view source on GitHub ↗

[[arrow::export]]

Source from the content-addressed store, hash-verified

67
68// [[arrow::export]]
69std::shared_ptr<arrow::Field> Field__WithMetadata(
70 const std::shared_ptr<arrow::Field>& field, cpp11::strings metadata) {
71 auto values = cpp11::as_cpp<std::vector<std::string>>(metadata);
72 auto names = cpp11::as_cpp<std::vector<std::string>>(metadata.attr("names"));
73 auto kv =
74 std::make_shared<arrow::KeyValueMetadata>(std::move(names), std::move(values));
75 return field->WithMetadata(std::move(kv));
76}
77
78// [[arrow::export]]
79std::shared_ptr<arrow::Field> Field__RemoveMetadata(

Callers 1

Calls 1

WithMetadataMethod · 0.45

Tested by

no test coverage detected