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

Method Equals

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

Source from the content-addressed store, hash-verified

237}
238
239bool KeyValueMetadata::Equals(const KeyValueMetadata& other) const {
240 if (size() != other.size()) {
241 return false;
242 }
243
244 auto indices = internal::ArgSort(keys_);
245 auto other_indices = internal::ArgSort(other.keys_);
246
247 for (int64_t i = 0; i < size(); ++i) {
248 auto j = indices[i];
249 auto k = other_indices[i];
250 if (keys_[j] != other.keys_[k] || values_[j] != other.values_[k]) {
251 return false;
252 }
253 }
254 return true;
255}
256
257std::string KeyValueMetadata::ToString() const {
258 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