Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use provided memory resource for allocating mixed join results. #16153

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions cpp/src/join/mixed_join.cu
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ mixed_join(
// Left and full joins all return all the row indices from
// left with a corresponding NULL from the right.
case join_kind::LEFT_JOIN:
case join_kind::FULL_JOIN:
return get_trivial_left_join_indices(
left_conditional, stream, rmm::mr::get_current_device_resource());
case join_kind::FULL_JOIN: return get_trivial_left_join_indices(left_conditional, stream, mr);
// Inner joins return empty output because no matches can exist.
case join_kind::INNER_JOIN:
return std::pair(std::make_unique<rmm::device_uvector<size_type>>(0, stream, mr),
Expand All @@ -100,8 +98,7 @@ mixed_join(
std::make_unique<rmm::device_uvector<size_type>>(0, stream, mr));
// Full joins need to return the trivial complement.
case join_kind::FULL_JOIN: {
auto ret_flipped = get_trivial_left_join_indices(
right_conditional, stream, rmm::mr::get_current_device_resource());
auto ret_flipped = get_trivial_left_join_indices(right_conditional, stream, mr);
return std::pair(std::move(ret_flipped.second), std::move(ret_flipped.first));
}
default: CUDF_FAIL("Invalid join kind."); break;
Expand Down
4 changes: 1 addition & 3 deletions cpp/src/join/mixed_join_semi.cu
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ std::unique_ptr<rmm::device_uvector<size_type>> mixed_join_semi(
// Anti and semi return all the row indices from left
// with a corresponding NULL from the right.
case join_kind::LEFT_ANTI_JOIN:
return get_trivial_left_join_indices(
left_conditional, stream, rmm::mr::get_current_device_resource())
.first;
return get_trivial_left_join_indices(left_conditional, stream, mr).first;
// Inner and left semi joins return empty output because no matches can exist.
case join_kind::LEFT_SEMI_JOIN:
return std::make_unique<rmm::device_uvector<size_type>>(0, stream, mr);
Expand Down
Loading