JabariBooker commented on code in PR #13051:
URL: https://github.com/apache/arrow/pull/13051#discussion_r867069250


##########
cpp/src/arrow/compute/exec/hash_join_node.cc:
##########
@@ -453,6 +453,20 @@ Status 
HashJoinSchema::CollectFilterColumns(std::vector<FieldRef>& left_filter,
   return Status::OK();
 }
 
+Status ValidateHashJoinNodeOptions(const HashJoinNodeOptions& join_options) {
+  if (join_options.key_cmp.size() < 1 || join_options.left_keys.size() < 1 ||
+      join_options.right_keys.size() < 1) {
+    return Status::Invalid("key_cmp and keys cannot be empty");
+  }
+
+  if ((join_options.key_cmp.size() != join_options.left_keys.size()) ||
+      (join_options.key_cmp.size() != join_options.right_keys.size()) {
+    return Status::Invalid("key_cmp and keys must have the same size");
+  }

Review Comment:
   This is implied in the logic of this if statement. If `key_cmp.size() == 
left_keys.size()` and `key_cmp.size() == right_keys.size()`, then 
`left_keys.size() == right_keys.size()` must be true as well.



-- 
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