distinct_hash_join.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2025, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <cudf/hashing.hpp>
21 #include <cudf/types.hpp>
23 #include <cudf/utilities/export.hpp>
25 
26 #include <rmm/cuda_stream_view.hpp>
27 #include <rmm/device_uvector.hpp>
28 
29 #include <utility>
30 
31 namespace CUDF_EXPORT cudf {
32 
39 namespace detail {
43 class distinct_hash_join;
44 } // namespace detail
45 
57  public:
58  distinct_hash_join() = delete;
60  distinct_hash_join(distinct_hash_join const&) = delete;
62  distinct_hash_join& operator=(distinct_hash_join const&) = delete;
63  distinct_hash_join& operator=(distinct_hash_join&&) = delete;
64 
73  null_equality compare_nulls = null_equality::EQUAL,
75 
88  [[nodiscard]] std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
89  std::unique_ptr<rmm::device_uvector<size_type>>>
93 
111  [[nodiscard]] std::unique_ptr<rmm::device_uvector<size_type>> left_join(
112  cudf::table_view const& probe,
115 
116  private:
117  using impl_type = cudf::detail::distinct_hash_join;
118 
119  std::unique_ptr<impl_type> _impl;
120 };
121  // end of group
123 
124 } // 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...
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 ...
distinct_hash_join(cudf::table_view const &build, null_equality compare_nulls=null_equality::EQUAL, rmm::cuda_stream_view stream=cudf::get_default_stream())
Constructs a distinct hash join object for subsequent probe calls.
A set of cudf::column_view's of the same size.
Definition: table_view.hpp:200
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.
cuda::mr::async_resource_ref< cuda::mr::device_accessible > device_async_resource_ref
null_equality
Enum to consider two nulls as equal or unequal.
Definition: types.hpp:151
cuDF interfaces
Definition: host_udf.hpp:37
Class definitions for (mutable)_table_view
Type declarations for libcudf.