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/cuda_stream_view.hpp>
17 #include <rmm/device_uvector.hpp>
18 
19 #include <optional>
20 #include <utility>
21 
27 namespace CUDF_EXPORT cudf {
28 
70 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
71  std::unique_ptr<rmm::device_uvector<size_type>>>
73  table_view const& right,
74  ast::expression const& binary_predicate,
75  std::optional<std::size_t> output_size = {},
78 
117 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
118  std::unique_ptr<rmm::device_uvector<size_type>>>
120  table_view const& right,
121  ast::expression const& binary_predicate,
122  std::optional<std::size_t> output_size = {},
125 
162 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
163  std::unique_ptr<rmm::device_uvector<size_type>>>
165  table_view const& right,
166  ast::expression const& binary_predicate,
169 
203 std::unique_ptr<rmm::device_uvector<size_type>> conditional_left_semi_join(
204  table_view const& left,
205  table_view const& right,
206  ast::expression const& binary_predicate,
207  std::optional<std::size_t> output_size = {},
210 
244 std::unique_ptr<rmm::device_uvector<size_type>> conditional_left_anti_join(
245  table_view const& left,
246  table_view const& right,
247  ast::expression const& binary_predicate,
248  std::optional<std::size_t> output_size = {},
251 
271  table_view const& left,
272  table_view const& right,
273  ast::expression const& binary_predicate,
276 
296  table_view const& left,
297  table_view const& right,
298  ast::expression const& binary_predicate,
301 
321  table_view const& left,
322  table_view const& right,
323  ast::expression const& binary_predicate,
326 
346  table_view const& left,
347  table_view const& right,
348  ast::expression const& binary_predicate,
351  // end of group
353 
354 } // 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::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, rmm::cuda_stream_view 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_inner_join_size(table_view const &left, table_view const &right, ast::expression const &binary_predicate, rmm::cuda_stream_view 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::size_t conditional_left_semi_join_size(table_view const &left, table_view const &right, ast::expression const &binary_predicate, rmm::cuda_stream_view 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...
std::size_t conditional_left_anti_join_size(table_view const &left, table_view const &right, ast::expression const &binary_predicate, rmm::cuda_stream_view 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::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={}, rmm::cuda_stream_view 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::size_t conditional_left_join_size(table_view const &left, table_view const &right, ast::expression const &binary_predicate, rmm::cuda_stream_view 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::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={}, rmm::cuda_stream_view 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={}, rmm::cuda_stream_view 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::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={}, rmm::cuda_stream_view 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...
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::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:26
APIs for spans.
A generic expression that can be evaluated to return a value.
Definition: expressions.hpp:69
Class definitions for (mutable)_table_view
Type declarations for libcudf.