lidavidm commented on code in PR #13567:
URL: https://github.com/apache/arrow/pull/13567#discussion_r918888503


##########
cpp/src/arrow/dataset/partition.cc:
##########
@@ -115,6 +119,28 @@ static Result<RecordBatchVector> ApplyGroupings(
   return out;
 }
 
+bool KeyValuePartitioning::Equals(const Partitioning& other) const {
+  if (this == &other) {
+    return true;
+  }
+  const auto& kv_partitioning = checked_cast<const 
KeyValuePartitioning&>(other);
+  const auto& other_dictionaries = kv_partitioning.dictionaries();
+  if (dictionaries_.size() != other_dictionaries.size()) {
+    return false;
+  }
+  int64_t idx = 0;
+  for (const auto& array : dictionaries_) {
+    const auto& other_array = other_dictionaries[idx++];
+    bool match = (array == NULLPTR && other_array == NULLPTR) ||

Review Comment:
   just a reminder: NULLPTR is only required in headers, regular code can use 
`nullptr` like usual.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to