westonpace commented on code in PR #13051:
URL: https://github.com/apache/arrow/pull/13051#discussion_r864097545
##########
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:
In addition, the left keys and right keys must have length equal to each
other. E.g. `left_keys.size() == right_keys.size()`
--
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]