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

Method Equals

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

Source from the content-addressed store, hash-verified

231}
232
233bool KeyValueMetadata::Equals(const KeyValueMetadata& other) const {
234 if (size() != other.size()) {
235 return false;
236 }
237
238 auto indices = internal::ArgSort(keys_);
239 auto other_indices = internal::ArgSort(other.keys_);
240
241 for (int64_t i = 0; i < size(); ++i) {
242 auto j = indices[i];
243 auto k = other_indices[i];
244 if (keys_[j] != other.keys_[k] || values_[j] != other.values_[k]) {
245 return false;
246 }
247 }
248 return true;
249}
250
251std::string KeyValueMetadata::ToString() const {
252 std::stringstream buffer;

Callers

nothing calls this directly

Calls 3

ArgSortFunction · 0.85
sizeFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected