mark_join.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #pragma once
7 
8 #include <cudf/join/join.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 <memory>
19 
20 namespace CUDF_EXPORT cudf {
21 
28 namespace detail {
29 class mark_join;
30 } // namespace detail
31 
61 class mark_join {
62  public:
63  mark_join() = delete;
64  ~mark_join();
65  mark_join(mark_join const&) = delete;
66  mark_join(mark_join&&) = delete;
67  mark_join& operator=(mark_join const&) = delete;
68  mark_join& operator=(mark_join&&) = delete;
69 
80  // rapids-pre-commit-hooks: disable-next-line
81  [[deprecated(
82  "Use the overload accepting cudf::join_prefilter instead."
83  " This overload will be removed in the next release.")]]
85  cudf::null_equality compare_nulls = null_equality::EQUAL,
87 
97  cudf::null_equality compare_nulls,
98  cudf::join_prefilter prefilter,
100 
112  // rapids-pre-commit-hooks: disable-next-line
113  [[deprecated(
114  "Use the overload accepting cudf::join_prefilter instead."
115  " This overload will be removed in the next release.")]]
117  cudf::null_equality compare_nulls,
118  double load_factor,
120 
131  double load_factor,
133  cudf::join_prefilter prefilter = cudf::join_prefilter::NO,
135 
144  [[nodiscard]] std::unique_ptr<rmm::device_uvector<size_type>> semi_join(
145  cudf::table_view const& probe,
148 
157  [[nodiscard]] std::unique_ptr<rmm::device_uvector<size_type>> anti_join(
158  cudf::table_view const& probe,
161 
162  private:
163  std::unique_ptr<cudf::detail::mark_join> _impl;
164 };
165  // end of group
167 
168 } // namespace CUDF_EXPORT cudf
Mark-based hash join for semi/anti join with left table reuse.
Definition: mark_join.hpp:61
mark_join(cudf::table_view const &build, cudf::null_equality compare_nulls=null_equality::EQUAL, rmm::cuda_stream_view stream=cudf::get_default_stream())
Constructs a mark join object by building a hash table from the build table.
mark_join(cudf::table_view const &build, cudf::null_equality compare_nulls, double load_factor, rmm::cuda_stream_view stream=cudf::get_default_stream())
Constructs a mark join object with a specified load factor.
std::unique_ptr< rmm::device_uvector< size_type > > semi_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 build row indices that have at least one match in the probe table.
mark_join(cudf::table_view const &build, double load_factor, cudf::null_equality compare_nulls=cudf::null_equality::EQUAL, cudf::join_prefilter prefilter=cudf::join_prefilter::NO, rmm::cuda_stream_view stream=cudf::get_default_stream())
Constructs a mark join object with explicit prefilter selection.
mark_join(cudf::table_view const &build, cudf::null_equality compare_nulls, cudf::join_prefilter prefilter, rmm::cuda_stream_view stream=cudf::get_default_stream())
Constructs a mark join object with explicit prefilter selection.
std::unique_ptr< rmm::device_uvector< size_type > > anti_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 build row indices that have no match in the probe table.
A set of cudf::column_view's of the same size.
Definition: table_view.hpp:189
join_prefilter
Specifies whether a join implementation should apply an optional probe-side prefilter.
Definition: join.hpp:51
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
@ EQUAL
nulls compare equal
cuDF interfaces
Definition: host_udf.hpp:26
Class definitions for (mutable)_table_view
Type declarations for libcudf.