You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/03 00:19:17 UTC
[GitHub] [arrow] JabariBooker opened a new pull request, #13051: ARROW-14185: [C++] HashJoinNode should validate HashJoinNodeOptions
JabariBooker opened a new pull request, #13051:
URL: https://github.com/apache/arrow/pull/13051
Adding validation for HashJoinNodeOptions
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] JabariBooker commented on a diff in pull request #13051: ARROW-14185: [C++] HashJoinNode should validate HashJoinNodeOptions
Posted by GitBox <gi...@apache.org>.
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] vibhatha commented on a diff in pull request #13051: ARROW-14185: [C++] HashJoinNode should validate HashJoinNodeOptions
Posted by GitBox <gi...@apache.org>.
vibhatha commented on code in PR #13051:
URL: https://github.com/apache/arrow/pull/13051#discussion_r866889090
##########
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) {
Review Comment:
Nit: Wouldn't it be better to call `empty()` on vectors?
For instance:
```c++
if (join_options.empty() || join_options.left_keys.empty() < 1 || join_options.right_keys.empty())
```
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] JabariBooker commented on pull request #13051: ARROW-14185: [C++] HashJoinNode should validate HashJoinNodeOptions
Posted by GitBox <gi...@apache.org>.
JabariBooker commented on PR #13051:
URL: https://github.com/apache/arrow/pull/13051#issuecomment-1149244265
> Hmm, the docs CI is persistently failing. Do you mind rebasing @JabariBooker?
@lidavidm Seems to have fixed the issue. Now there are failures for `TestS3FS` and `TestS3FSGeneric` due to an IOError.
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] lidavidm commented on pull request #13051: ARROW-14185: [C++] HashJoinNode should validate HashJoinNodeOptions
Posted by GitBox <gi...@apache.org>.
lidavidm commented on PR #13051:
URL: https://github.com/apache/arrow/pull/13051#issuecomment-1148559658
Hmm, the docs CI is persistently failing. Do you mind rebasing @JabariBooker?
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] lidavidm commented on pull request #13051: ARROW-14185: [C++] HashJoinNode should validate HashJoinNodeOptions
Posted by GitBox <gi...@apache.org>.
lidavidm commented on PR #13051:
URL: https://github.com/apache/arrow/pull/13051#issuecomment-1149803066
Thanks!
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] lidavidm commented on pull request #13051: ARROW-14185: [C++] HashJoinNode should validate HashJoinNodeOptions
Posted by GitBox <gi...@apache.org>.
lidavidm commented on PR #13051:
URL: https://github.com/apache/arrow/pull/13051#issuecomment-1116309424
General comment: can we also add a few short unit tests to test this validation?
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] vibhatha commented on a diff in pull request #13051: ARROW-14185: [C++] HashJoinNode should validate HashJoinNodeOptions
Posted by GitBox <gi...@apache.org>.
vibhatha commented on code in PR #13051:
URL: https://github.com/apache/arrow/pull/13051#discussion_r866890158
##########
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) {
Review Comment:
It matches the Status message as well.
##########
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) {
Review Comment:
Nit: Wouldn't it be better to call `empty()` on vectors?
For instance:
```c++
if (join_options.empty() || join_options.left_keys.empty() || join_options.right_keys.empty())
```
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] westonpace commented on pull request #13051: ARROW-14185: [C++] HashJoinNode should validate HashJoinNodeOptions
Posted by GitBox <gi...@apache.org>.
westonpace commented on PR #13051:
URL: https://github.com/apache/arrow/pull/13051#issuecomment-1121774378
Also, I agree with David's comment, can we add a quick unit test?
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] github-actions[bot] commented on pull request #13051: ARROW-14185: [C++] HashJoinNode should validate HashJoinNodeOptions
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13051:
URL: https://github.com/apache/arrow/pull/13051#issuecomment-1115490983
:warning: Ticket **has not been started in JIRA**, please click 'Start Progress'.
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] lidavidm merged pull request #13051: ARROW-14185: [C++] HashJoinNode should validate HashJoinNodeOptions
Posted by GitBox <gi...@apache.org>.
lidavidm merged PR #13051:
URL: https://github.com/apache/arrow/pull/13051
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] github-actions[bot] commented on pull request #13051: ARROW-14185: [C++] HashJoinNode should validate HashJoinNodeOptions
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13051:
URL: https://github.com/apache/arrow/pull/13051#issuecomment-1115490971
https://issues.apache.org/jira/browse/ARROW-14185
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] westonpace commented on a diff in pull request #13051: ARROW-14185: [C++] HashJoinNode should validate HashJoinNodeOptions
Posted by GitBox <gi...@apache.org>.
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] vibhatha commented on a diff in pull request #13051: ARROW-14185: [C++] HashJoinNode should validate HashJoinNodeOptions
Posted by GitBox <gi...@apache.org>.
vibhatha commented on code in PR #13051:
URL: https://github.com/apache/arrow/pull/13051#discussion_r866889090
##########
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) {
Review Comment:
Nit: Wouldn't it be better to call `empty()` on vectors?
For instance:
```c++
if (join_options.key_cmp.empty() || join_options.left_keys.empty() || join_options.right_keys.empty())
```
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org