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


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

Review Comment:
   @pitrou thanks for noting this one. I am not very much familiary with this 
piece of the code please advice.
   
   But I guess in general, whatever the system thinks, I should first check the 
size and if size differs this should return false right? I totally missed this 
part. Partially being there cannot be taken as a fulfilment of equality right?



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to