libcudf  23.12.00
Classes | Namespaces | Enumerations | Functions
join.hpp File Reference
#include <cudf/ast/expressions.hpp>
#include <cudf/hashing.hpp>
#include <cudf/table/table_view.hpp>
#include <cudf/types.hpp>
#include <cudf/utilities/default_stream.hpp>
#include <cudf/utilities/span.hpp>
#include <rmm/cuda_stream_view.hpp>
#include <rmm/device_uvector.hpp>
#include <rmm/mr/device/per_device_resource.hpp>
#include <optional>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  cudf::hash_join
 Hash join that builds hash table in creation and probes results in subsequent *_join member functions. More...
 

Namespaces

 cudf
 cuDF interfaces
 
 cudf::hashing
 Hash APIs.
 

Enumerations

enum class  cudf::nullable_join : bool { YES , NO }
 The enum class to specify if any of the input join tables (build table and any later probe table) has nulls. More...
 

Functions

std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > cudf::inner_join (cudf::table_view const &left_keys, cudf::table_view const &right_keys, null_equality compare_nulls=null_equality::EQUAL, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns a pair of row index vectors corresponding to an inner join between the specified tables. More...
 
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > cudf::left_join (cudf::table_view const &left_keys, cudf::table_view const &right_keys, null_equality compare_nulls=null_equality::EQUAL, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns a pair of row index vectors corresponding to a left join between the specified tables. More...
 
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > cudf::full_join (cudf::table_view const &left_keys, cudf::table_view const &right_keys, null_equality compare_nulls=null_equality::EQUAL, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns a pair of row index vectors corresponding to a full join between the specified tables. More...
 
std::unique_ptr< rmm::device_uvector< size_type > > cudf::left_semi_join (cudf::table_view const &left_keys, cudf::table_view const &right_keys, null_equality compare_nulls=null_equality::EQUAL, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns a vector of row indices corresponding to a left semi-join between the specified tables. More...
 
std::unique_ptr< rmm::device_uvector< size_type > > cudf::left_anti_join (cudf::table_view const &left_keys, cudf::table_view const &right_keys, null_equality compare_nulls=null_equality::EQUAL, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns a vector of row indices corresponding to a left anti join between the specified tables. More...
 
std::unique_ptr< cudf::tablecudf::cross_join (cudf::table_view const &left, cudf::table_view const &right, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Performs a cross join on two tables (left, right) More...
 
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > cudf::conditional_inner_join (table_view const &left, table_view const &right, ast::expression const &binary_predicate, std::optional< std::size_t > output_size={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns a pair of row index vectors corresponding to all pairs of rows between the specified tables where the predicate evaluates to true. More...
 
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > cudf::conditional_left_join (table_view const &left, table_view const &right, ast::expression const &binary_predicate, std::optional< std::size_t > output_size={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns a pair of row index vectors corresponding to all pairs of rows between the specified tables where the predicate evaluates to true, or null matches for rows in left that have no match in right. More...
 
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > cudf::conditional_full_join (table_view const &left, table_view const &right, ast::expression const &binary_predicate, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns a pair of row index vectors corresponding to all pairs of rows between the specified tables where the predicate evaluates to true, or null matches for rows in either table that have no match in the other. More...
 
std::unique_ptr< rmm::device_uvector< size_type > > cudf::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::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns an index vector corresponding to all rows in the left table for which there exists some row in the right table where the predicate evaluates to true. More...
 
std::unique_ptr< rmm::device_uvector< size_type > > cudf::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::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns an index vector corresponding to all rows in the left table for which there does not exist any row in the right table where the predicate evaluates to true. More...
 
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > cudf::mixed_inner_join (table_view const &left_equality, table_view const &right_equality, table_view const &left_conditional, table_view const &right_conditional, ast::expression const &binary_predicate, null_equality compare_nulls=null_equality::EQUAL, std::optional< std::pair< std::size_t, device_span< size_type const >>> output_size_data={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns a pair of row index vectors corresponding to all pairs of rows between the specified tables where the columns of the equality table are equal and the predicate evaluates to true on the conditional tables. More...
 
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > cudf::mixed_left_join (table_view const &left_equality, table_view const &right_equality, table_view const &left_conditional, table_view const &right_conditional, ast::expression const &binary_predicate, null_equality compare_nulls=null_equality::EQUAL, std::optional< std::pair< std::size_t, device_span< size_type const >>> output_size_data={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns a pair of row index vectors corresponding to all pairs of rows between the specified tables where the columns of the equality table are equal and the predicate evaluates to true on the conditional tables, or null matches for rows in left that have no match in right. More...
 
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > cudf::mixed_full_join (table_view const &left_equality, table_view const &right_equality, table_view const &left_conditional, table_view const &right_conditional, ast::expression const &binary_predicate, null_equality compare_nulls=null_equality::EQUAL, std::optional< std::pair< std::size_t, device_span< size_type const >>> output_size_data={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns a pair of row index vectors corresponding to all pairs of rows between the specified tables where the columns of the equality table are equal and the predicate evaluates to true on the conditional tables, or null matches for rows in either pair of tables that have no matches in the other pair. More...
 
std::unique_ptr< rmm::device_uvector< size_type > > cudf::mixed_left_semi_join (table_view const &left_equality, table_view const &right_equality, table_view const &left_conditional, table_view const &right_conditional, ast::expression const &binary_predicate, null_equality compare_nulls=null_equality::EQUAL, std::optional< std::pair< std::size_t, device_span< size_type const >>> output_size_data={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns an index vector corresponding to all rows in the left tables where the columns of the equality table are equal and the predicate evaluates to true on the conditional tables. More...
 
std::unique_ptr< rmm::device_uvector< size_type > > cudf::mixed_left_anti_join (table_view const &left_equality, table_view const &right_equality, table_view const &left_conditional, table_view const &right_conditional, ast::expression const &binary_predicate, null_equality compare_nulls=null_equality::EQUAL, std::optional< std::pair< std::size_t, device_span< size_type const >>> output_size_data={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns an index vector corresponding to all rows in the left tables for which there is no row in the right tables where the columns of the equality table are equal and the predicate evaluates to true on the conditional tables. More...
 
std::pair< std::size_t, std::unique_ptr< rmm::device_uvector< size_type > > > cudf::mixed_inner_join_size (table_view const &left_equality, table_view const &right_equality, table_view const &left_conditional, table_view const &right_conditional, ast::expression const &binary_predicate, null_equality compare_nulls=null_equality::EQUAL, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns the exact number of matches (rows) when performing a mixed inner join between the specified tables where the columns of the equality table are equal and the predicate evaluates to true on the conditional tables. More...
 
std::pair< std::size_t, std::unique_ptr< rmm::device_uvector< size_type > > > cudf::mixed_left_join_size (table_view const &left_equality, table_view const &right_equality, table_view const &left_conditional, table_view const &right_conditional, ast::expression const &binary_predicate, null_equality compare_nulls=null_equality::EQUAL, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns the exact number of matches (rows) when performing a mixed left join between the specified tables where the columns of the equality table are equal and the predicate evaluates to true on the conditional tables. More...
 
std::pair< std::size_t, std::unique_ptr< rmm::device_uvector< size_type > > > cudf::mixed_left_semi_join_size (table_view const &left_equality, table_view const &right_equality, table_view const &left_conditional, table_view const &right_conditional, ast::expression const &binary_predicate, null_equality compare_nulls=null_equality::EQUAL, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns the exact number of matches (rows) when performing a mixed left semi join between the specified tables where the columns of the equality table are equal and the predicate evaluates to true on the conditional tables. More...
 
std::pair< std::size_t, std::unique_ptr< rmm::device_uvector< size_type > > > cudf::mixed_left_anti_join_size (table_view const &left_equality, table_view const &right_equality, table_view const &left_conditional, table_view const &right_conditional, ast::expression const &binary_predicate, null_equality compare_nulls=null_equality::EQUAL, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns the exact number of matches (rows) when performing a mixed left anti join between the specified tables. More...
 
std::size_t cudf::conditional_inner_join_size (table_view const &left, table_view const &right, ast::expression const &binary_predicate, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns the exact number of matches (rows) when performing a conditional inner join between the specified tables where the predicate evaluates to true. More...
 
std::size_t cudf::conditional_left_join_size (table_view const &left, table_view const &right, ast::expression const &binary_predicate, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns the exact number of matches (rows) when performing a conditional left join between the specified tables where the predicate evaluates to true. More...
 
std::size_t cudf::conditional_left_semi_join_size (table_view const &left, table_view const &right, ast::expression const &binary_predicate, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns the exact number of matches (rows) when performing a conditional left semi join between the specified tables where the predicate evaluates to true. More...
 
std::size_t cudf::conditional_left_anti_join_size (table_view const &left, table_view const &right, ast::expression const &binary_predicate, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Returns the exact number of matches (rows) when performing a conditional left anti join between the specified tables where the predicate evaluates to true. More...