distinct_hash_join.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #pragma once
7 
8 #include <cudf/hashing.hpp>
10 #include <cudf/types.hpp>
12 #include <cudf/utilities/export.hpp>
14 
15 #include <rmm/device_uvector.hpp>
16 
17 #include <cuda/stream>
18 
19 #include <utility>
20 
27 namespace CUDF_EXPORT cudf {
28 
34 namespace detail {
38 class distinct_hash_join;
39 } // namespace detail
40 
52  public:
53  distinct_hash_join() = delete;
55  distinct_hash_join(distinct_hash_join const&) = delete;
57  distinct_hash_join& operator=(distinct_hash_join const&) = delete;
58  distinct_hash_join& operator=(distinct_hash_join&&) = delete;
59 
75  null_equality compare_nulls = null_equality::EQUAL,
76  double load_factor = 0.5,
77  cuda::stream_ref stream = cudf::get_default_stream(),
78  cuda::mr::any_resource<cuda::mr::device_accessible> mr =
80 
93  [[nodiscard]] std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
94  std::unique_ptr<rmm::device_uvector<size_type>>>
96  cuda::stream_ref stream = cudf::get_default_stream(),
98 
116  [[nodiscard]] std::unique_ptr<rmm::device_uvector<size_type>> left_join(
117  cudf::table_view const& left,
118  cuda::stream_ref stream = cudf::get_default_stream(),
120 
121  private:
122  using impl_type = cudf::detail::distinct_hash_join;
123 
124  std::unique_ptr<impl_type> _impl;
125 };
126  // end of group
128 
129 } // namespace CUDF_EXPORT cudf
Distinct hash join that builds a hash table with the right table on construction and probes results i...
std::unique_ptr< rmm::device_uvector< size_type > > left_join(cudf::table_view const &left, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) const
Returns the right table indices that can be used to construct the result of performing a left join be...
distinct_hash_join(cudf::table_view const &right, null_equality compare_nulls=null_equality::EQUAL, double load_factor=0.5, cuda::stream_ref stream=cudf::get_default_stream(), cuda::mr::any_resource< cuda::mr::device_accessible > mr=cudf::get_current_device_resource_ref())
Constructs a distinct hash join object for subsequent probe calls.
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > inner_join(cudf::table_view const &left, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) const
Returns the row indices that can be used to construct the result of performing an inner join between ...
A set of cudf::column_view's of the same size.
Definition: table_view.hpp:206
APIs for querying the default CUDA stream and per-thread default stream status.
cuda::stream_ref const get_default_stream()
Get the current default stream.
rmm::device_async_resource_ref get_current_device_resource_ref()
Get the current device memory resource reference.
cuda::mr::resource_ref< cuda::mr::device_accessible > device_async_resource_ref
null_equality
Enum to consider two nulls as equal or unequal.
Definition: types.hpp:132
APIs for computing hash values of columns and tables using various hash algorithms.
APIs for getting and setting the current device memory resource.
cuDF interfaces
Definition: host_udf.hpp:27
Class definitions for (mutable)_table_view
Type declarations for libcudf.