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

Method Delete

cpp/src/arrow/util/key_value_metadata.cc:102–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102Status KeyValueMetadata::Delete(int64_t index) {
103 if (ARROW_PREDICT_FALSE(index < 0 || index >= static_cast<int64_t>(keys_.size()))) {
104 return Status::IndexError("KeyValueMetadata::Delete: index ", index,
105 " is out of bounds for metadata "
106 "of size ",
107 keys_.size());
108 }
109 keys_.erase(keys_.begin() + index);
110 values_.erase(values_.begin() + index);
111 return Status::OK();
112}
113
114Status KeyValueMetadata::DeleteMany(std::vector<int64_t> indices) {
115 std::sort(indices.begin(), indices.end());

Callers

nothing calls this directly

Calls 5

IndexErrorFunction · 0.85
KeyErrorFunction · 0.85
OKFunction · 0.50
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected