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

Method Equals

cpp/src/arrow/dataset/partition.cc:96–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96bool KeyValuePartitioning::Equals(const Partitioning& other) const {
97 if (this == &other) {
98 return true;
99 }
100 const auto& kv_partitioning = checked_cast<const KeyValuePartitioning&>(other);
101 const auto& other_dictionaries = kv_partitioning.dictionaries();
102 if (dictionaries_.size() != other_dictionaries.size()) {
103 return false;
104 }
105 int64_t idx = 0;
106 for (const auto& array : dictionaries_) {
107 const auto& other_array = other_dictionaries[idx++];
108 bool match = (array == nullptr && other_array == nullptr) ||
109 (array && other_array && array->Equals(other_array));
110 if (!match) {
111 return false;
112 }
113 }
114 return options_.segment_encoding == kv_partitioning.options_.segment_encoding &&
115 Partitioning::Equals(other);
116}
117
118Result<Partitioning::PartitionedBatches> KeyValuePartitioning::Partition(
119 const std::shared_ptr<RecordBatch>& batch) const {

Callers 2

ConvertKeyMethod · 0.45
FormatMethod · 0.45

Calls 8

null_fallbackFunction · 0.85
optionsFunction · 0.85
dictionariesMethod · 0.80
EqualsFunction · 0.70
type_nameFunction · 0.70
sizeMethod · 0.45
type_nameMethod · 0.45
optionsMethod · 0.45

Tested by

no test coverage detected