conditional_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 
10 #include <cudf/types.hpp>
12 #include <cudf/utilities/export.hpp>
14 #include <cudf/utilities/span.hpp>
15 
16 #include <rmm/device_uvector.hpp>
17 
18 #include <cuda/stream>
19 
20 #include <optional>
21 #include <utility>
22 
28 namespace CUDF_EXPORT cudf {
29 
71 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
72  std::unique_ptr<rmm::device_uvector<size_type>>>
74  table_view const& right,
75  ast::expression const& binary_predicate,
76  std::optional<std::size_t> output_size = {},
77  cuda::stream_ref stream = cudf::get_default_stream(),
79 
118 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
119  std::unique_ptr<rmm::device_uvector<size_type>>>
121  table_view const& right,
122  ast::expression const& binary_predicate,
123  std::optional<std::size_t> output_size = {},
124  cuda::stream_ref stream = cudf::get_default_stream(),
126 
163 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
164  std::unique_ptr<rmm::device_uvector<size_type>>>
166  table_view const& right,
167  ast::expression const& binary_predicate,
168  cuda::stream_ref stream = cudf::get_default_stream(),
170 
204 std::unique_ptr<rmm::device_uvector<size_type>> conditional_left_semi_join(
205  table_view const& left,
206  table_view const& right,
207  ast::expression const& binary_predicate,
208  std::optional<std::size_t> output_size = {},
209  cuda::stream_ref stream = cudf::get_default_stream(),
211 
245 std::unique_ptr<rmm::device_uvector<size_type>> conditional_left_anti_join(
246  table_view const& left,
247  table_view const& right,
248  ast::expression const& binary_predicate,
249  std::optional<std::size_t> output_size = {},
250  cuda::stream_ref stream = cudf::get_default_stream(),
252 
272  table_view const& left,
273  table_view const& right,
274  ast::expression const& binary_predicate,
275  cuda::stream_ref stream = cudf::get_default_stream(),
277 
297  table_view const& left,
298  table_view const& right,
299  ast::expression const& binary_predicate,
300  cuda::stream_ref stream = cudf::get_default_stream(),
302 
322  table_view const& left,
323  table_view const& right,
324  ast::expression const& binary_predicate,
325  cuda::stream_ref stream = cudf::get_default_stream(),
327 
347  table_view const& left,
348  table_view const& right,
349  ast::expression const& binary_predicate,
350  cuda::stream_ref stream = cudf::get_default_stream(),
352  // end of group
354 
355 } // namespace CUDF_EXPORT cudf
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.
Class definitions for building and evaluating abstract syntax tree expressions.
std::unique_ptr< rmm::device_uvector< size_type > > conditional_left_anti_join(table_view const &left, table_view const &right, ast::expression const &binary_predicate, std::optional< std::size_t > output_size={}, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns an index vector corresponding to all rows in the left table for which there does not exist an...
std::unique_ptr< rmm::device_uvector< size_type > > conditional_left_semi_join(table_view const &left, table_view const &right, ast::expression const &binary_predicate, std::optional< std::size_t > output_size={}, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns an index vector corresponding to all rows in the left table for which there exists some row i...
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > conditional_full_join(table_view const &left, table_view const &right, ast::expression const &binary_predicate, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns a pair of row index vectors corresponding to all pairs of rows between the specified tables w...
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > conditional_left_join(table_view const &left, table_view const &right, ast::expression const &binary_predicate, std::optional< std::size_t > output_size={}, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns a pair of row index vectors corresponding to all pairs of rows between the specified tables w...
std::size_t conditional_left_anti_join_size(table_view const &left, table_view const &right, ast::expression const &binary_predicate, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns the exact number of matches (rows) when performing a conditional left anti join between the s...
std::size_t conditional_left_join_size(table_view const &left, table_view const &right, ast::expression const &binary_predicate, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns the exact number of matches (rows) when performing a conditional left join between the specif...
std::size_t conditional_inner_join_size(table_view const &left, table_view const &right, ast::expression const &binary_predicate, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns the exact number of matches (rows) when performing a conditional inner join between the speci...
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > conditional_inner_join(table_view const &left, table_view const &right, ast::expression const &binary_predicate, std::optional< std::size_t > output_size={}, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns a pair of row index vectors corresponding to all pairs of rows between the specified tables w...
std::size_t conditional_left_semi_join_size(table_view const &left, table_view const &right, ast::expression const &binary_predicate, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns the exact number of matches (rows) when performing a conditional left semi join between the s...
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
APIs for getting and setting the current device memory resource.
cuDF interfaces
Definition: host_udf.hpp:27
APIs for spans.
A generic expression that can be evaluated to return a value.
Definition: expressions.hpp:72
Class definitions for (mutable)_table_view
Type declarations for libcudf.