distinct_hash_join.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION.
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/cuda_stream_view.hpp>
16 #include <rmm/device_uvector.hpp>
17 
18 #include <utility>
19 
20 namespace CUDF_EXPORT cudf {
21 
28 namespace detail {
32 class distinct_hash_join;
33 } // namespace detail
34 
46  public:
47  distinct_hash_join() = delete;
49  distinct_hash_join(distinct_hash_join const&) = delete;
51  distinct_hash_join& operator=(distinct_hash_join const&) = delete;
52  distinct_hash_join& operator=(distinct_hash_join&&) = delete;
53 
68  null_equality compare_nulls = null_equality::EQUAL,
69  double load_factor = 0.5,
71 
84  [[nodiscard]] std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
85  std::unique_ptr<rmm::device_uvector<size_type>>>
89 
107  [[nodiscard]] std::unique_ptr<rmm::device_uvector<size_type>> left_join(
108  cudf::table_view const& probe,
111 
112  private:
113  using impl_type = cudf::detail::distinct_hash_join;
114 
115  std::unique_ptr<impl_type> _impl;
116 };
117  // end of group
119 
120 } // namespace CUDF_EXPORT cudf
Distinct hash join that builds hash table in creation and probes results in subsequent *_join member ...
std::unique_ptr< rmm::device_uvector< size_type > > left_join(cudf::table_view const &probe, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) const
Returns the build table indices that can be used to construct the result of performing a left join be...
distinct_hash_join(cudf::table_view const &build, null_equality compare_nulls=null_equality::EQUAL, double load_factor=0.5, rmm::cuda_stream_view stream=cudf::get_default_stream())
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 &probe, rmm::cuda_stream_view 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:189
rmm::cuda_stream_view 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.
detail::cccl_async_resource_ref< 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:140
cuDF interfaces
Definition: host_udf.hpp:26
Class definitions for (mutable)_table_view
Type declarations for libcudf.