conditional_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/ast/expressions.hpp>
21 #include <cudf/types.hpp>
23 #include <cudf/utilities/export.hpp>
25 #include <cudf/utilities/span.hpp>
26 
27 #include <rmm/cuda_stream_view.hpp>
28 #include <rmm/device_uvector.hpp>
29 
30 #include <optional>
31 #include <utility>
32 
33 namespace CUDF_EXPORT cudf {
34 
77 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
78  std::unique_ptr<rmm::device_uvector<size_type>>>
80  table_view const& right,
81  ast::expression const& binary_predicate,
82  std::optional<std::size_t> output_size = {},
85 
124 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
125  std::unique_ptr<rmm::device_uvector<size_type>>>
127  table_view const& right,
128  ast::expression const& binary_predicate,
129  std::optional<std::size_t> output_size = {},
132 
169 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
170  std::unique_ptr<rmm::device_uvector<size_type>>>
172  table_view const& right,
173  ast::expression const& binary_predicate,
176 
210 std::unique_ptr<rmm::device_uvector<size_type>> conditional_left_semi_join(
211  table_view const& left,
212  table_view const& right,
213  ast::expression const& binary_predicate,
214  std::optional<std::size_t> output_size = {},
217 
251 std::unique_ptr<rmm::device_uvector<size_type>> conditional_left_anti_join(
252  table_view const& left,
253  table_view const& right,
254  ast::expression const& binary_predicate,
255  std::optional<std::size_t> output_size = {},
258 
278  table_view const& left,
279  table_view const& right,
280  ast::expression const& binary_predicate,
283 
303  table_view const& left,
304  table_view const& right,
305  ast::expression const& binary_predicate,
308 
328  table_view const& left,
329  table_view const& right,
330  ast::expression const& binary_predicate,
333 
353  table_view const& left,
354  table_view const& right,
355  ast::expression const& binary_predicate,
358  // end of group
360 
361 } // namespace CUDF_EXPORT cudf
A set of cudf::column_view's of the same size.
Definition: table_view.hpp:200
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::async_resource_ref< cuda::mr::device_accessible > device_async_resource_ref
cuDF interfaces
Definition: host_udf.hpp:37
APIs for spans.
A generic expression that can be evaluated to return a value.
Definition: expressions.hpp:48
Class definitions for (mutable)_table_view
Type declarations for libcudf.