Public Member Functions | List of all members
cudf::distinct_hash_join< HasNested > Class Template Reference

Distinct hash join that builds hash table in creation and probes results in subsequent *_join member functions. More...

#include <join.hpp>

Public Member Functions

 distinct_hash_join (distinct_hash_join const &)=delete
 
 distinct_hash_join (distinct_hash_join &&)=delete
 
distinct_hash_joinoperator= (distinct_hash_join const &)=delete
 
distinct_hash_joinoperator= (distinct_hash_join &&)=delete
 
 distinct_hash_join (cudf::table_view const &build, cudf::table_view const &probe, nullable_join has_nulls=nullable_join::YES, null_equality compare_nulls=null_equality::EQUAL, rmm::cuda_stream_view stream=cudf::get_default_stream())
 Constructs a distinct hash join object for subsequent probe calls. More...
 
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > inner_join (rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) const
 Returns the row indices that can be used to construct the result of performing an inner join between two tables. More...
 
std::unique_ptr< rmm::device_uvector< size_type > > left_join (rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) const
 Returns the build table indices that can be used to construct the result of performing a left join between two tables. More...
 

Detailed Description

template<cudf::has_nested HasNested>
class cudf::distinct_hash_join< HasNested >

Distinct hash join that builds hash table in creation and probes results in subsequent *_join member functions.

Note
Behavior is undefined if the build table contains duplicates.
All NaNs are considered as equal
Template Parameters
HasNestedFlag indicating whether there are nested columns in build/probe table

Definition at line 486 of file join.hpp.

Constructor & Destructor Documentation

◆ distinct_hash_join()

template<cudf::has_nested HasNested>
cudf::distinct_hash_join< HasNested >::distinct_hash_join ( cudf::table_view const &  build,
cudf::table_view const &  probe,
nullable_join  has_nulls = nullable_join::YES,
null_equality  compare_nulls = null_equality::EQUAL,
rmm::cuda_stream_view  stream = cudf::get_default_stream() 
)

Constructs a distinct hash join object for subsequent probe calls.

Parameters
buildThe build table that contains distinct elements
probeThe probe table, from which the keys are probed
has_nullsFlag to indicate if there exists any nulls in the build table or any probe table that will be used later for join
compare_nullsControls whether null join-key values should match or not
streamCUDA stream used for device memory operations and kernel launches

Member Function Documentation

◆ inner_join()

template<cudf::has_nested HasNested>
std::pair<std::unique_ptr<rmm::device_uvector<size_type> >, std::unique_ptr<rmm::device_uvector<size_type> > > cudf::distinct_hash_join< HasNested >::inner_join ( rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
) const

Returns the row indices that can be used to construct the result of performing an inner join between two tables.

See also
cudf::inner_join().
Parameters
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used to allocate the returned indices' device memory.
Returns
A pair of columns [build_indices, probe_indices] that can be used to construct the result of performing an inner join between two tables with build and probe as the join keys.

◆ left_join()

template<cudf::has_nested HasNested>
std::unique_ptr<rmm::device_uvector<size_type> > cudf::distinct_hash_join< HasNested >::left_join ( rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
) const

Returns the build table indices that can be used to construct the result of performing a left join between two tables.

Note
For a given row index i of the probe table, the resulting build_indices[i] contains the row index of the matched row from the build table if there is a match. Otherwise, contains JoinNoneValue.
Parameters
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used to allocate the returned table and columns' device memory.
Returns
A build_indices column that can be used to construct the result of performing a left join between two tables with build and probe as the join keys.

The documentation for this class was generated from the following file: