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 
9 #include <cudf/types.hpp>
11 #include <cudf/utilities/export.hpp>
13 
14 #include <rmm/cuda_stream_view.hpp>
15 #include <rmm/device_uvector.hpp>
16 
17 #include <memory>
18 
19 namespace CUDF_EXPORT cudf {
20 
27 namespace detail {
28 class mark_join;
29 } // namespace detail
30 
59 class mark_join {
60  public:
61  mark_join() = delete;
62  ~mark_join();
63  mark_join(mark_join const&) = delete;
64  mark_join(mark_join&&) = delete;
65  mark_join& operator=(mark_join const&) = delete;
66  mark_join& operator=(mark_join&&) = delete;
67 
76  cudf::null_equality compare_nulls = null_equality::EQUAL,
78 
88  cudf::null_equality compare_nulls,
89  double load_factor,
91 
100  [[nodiscard]] std::unique_ptr<rmm::device_uvector<size_type>> semi_join(
101  cudf::table_view const& probe,
104 
113  [[nodiscard]] std::unique_ptr<rmm::device_uvector<size_type>> anti_join(
114  cudf::table_view const& probe,
117 
118  private:
119  std::unique_ptr<cudf::detail::mark_join> _impl;
120 };
121  // end of group
123 
124 } // namespace CUDF_EXPORT cudf
Mark-based hash join for semi/anti join with left table reuse.
Definition: mark_join.hpp:59
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.
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
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.