26 #include <rmm/cuda_stream_view.hpp>
27 #include <rmm/device_uvector.hpp>
28 #include <rmm/mr/device/per_device_resource.hpp>
44 namespace hashing::detail {
52 template <cudf::has_nested HasNested>
94 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
95 std::unique_ptr<rmm::device_uvector<size_type>>>
99 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
134 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
135 std::unique_ptr<rmm::device_uvector<size_type>>>
139 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
173 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
174 std::unique_ptr<rmm::device_uvector<size_type>>>
178 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
206 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
237 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
264 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
338 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
339 std::unique_ptr<rmm::device_uvector<size_type>>>
341 std::optional<std::size_t> output_size = {},
343 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
const;
363 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
364 std::unique_ptr<rmm::device_uvector<size_type>>>
366 std::optional<std::size_t> output_size = {},
368 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
const;
388 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
389 std::unique_ptr<rmm::device_uvector<size_type>>>
391 std::optional<std::size_t> output_size = {},
393 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
const;
445 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
const;
448 const std::unique_ptr<impl_type const> _impl;
461 template <cudf::has_nested HasNested>
498 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
499 std::unique_ptr<rmm::device_uvector<size_type>>>
501 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
const;
517 std::unique_ptr<rmm::device_uvector<size_type>>
left_join(
519 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
const;
524 std::unique_ptr<impl_type> _impl;
562 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
563 std::unique_ptr<rmm::device_uvector<size_type>>>
568 std::optional<std::size_t> output_size = {},
569 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
608 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
609 std::unique_ptr<rmm::device_uvector<size_type>>>
613 std::optional<std::size_t> output_size = {},
614 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
651 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
652 std::unique_ptr<rmm::device_uvector<size_type>>>
656 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
694 std::optional<std::size_t> output_size = {},
695 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
733 std::optional<std::size_t> output_size = {},
734 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
782 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
783 std::unique_ptr<rmm::device_uvector<size_type>>>
792 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
842 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
843 std::unique_ptr<rmm::device_uvector<size_type>>>
852 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
902 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
903 std::unique_ptr<rmm::device_uvector<size_type>>>
912 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
963 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
1015 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
1055 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
1095 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
1135 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
1173 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
1196 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
1219 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
1242 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
1265 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
Distinct hash join that builds hash table in creation and probes results in subsequent *_join member ...
std::unique_ptr< rmm::device_uvector< size_type > > left_join(rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource()) const
Returns the build table indices that can be used to construct the result of performing a left join be...
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::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource()) const
Returns the row indices that can be used to construct the result of performing an inner join between ...
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.
Hash join that builds hash table in creation and probes results in subsequent *_join member functions...
hash_join(cudf::table_view const &build, nullable_join has_nulls, null_equality compare_nulls, rmm::cuda_stream_view stream=cudf::get_default_stream())
Construct a hash join object for subsequent probe calls.
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > inner_join(cudf::table_view const &probe, std::optional< std::size_t > output_size={}, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource()) const
typename cudf::detail::hash_join< cudf::hashing::detail::MurmurHash3_x86_32< cudf::hash_value_type > > impl_type
Implementation type.
std::size_t left_join_size(cudf::table_view const &probe, rmm::cuda_stream_view stream=cudf::get_default_stream()) const
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > full_join(cudf::table_view const &probe, std::optional< std::size_t > output_size={}, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource()) const
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > left_join(cudf::table_view const &probe, std::optional< std::size_t > output_size={}, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource()) const
std::size_t full_join_size(cudf::table_view const &probe, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource()) const
std::size_t inner_join_size(cudf::table_view const &probe, rmm::cuda_stream_view stream=cudf::get_default_stream()) const
hash_join(cudf::table_view const &build, null_equality compare_nulls, rmm::cuda_stream_view stream=cudf::get_default_stream())
Construct a hash join object for subsequent probe calls.
A set of cudf::column_view's of the same size.
std::size_t 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 s...
std::pair< std::size_t, std::unique_ptr< rmm::device_uvector< size_type > > > 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 specifi...
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > 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 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::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 an...
std::unique_ptr< rmm::device_uvector< size_type > > 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 equalit...
std::unique_ptr< cudf::table > 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)
std::unique_ptr< rmm::device_uvector< size_type > > 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.
std::unique_ptr< rmm::device_uvector< size_type > > 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.
has_nested
Enum to indicate whether the distinct join table has nested columns or not.
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > 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 w...
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > 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.
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::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 w...
std::pair< std::size_t, std::unique_ptr< rmm::device_uvector< size_type > > > 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 specifi...
std::unique_ptr< rmm::device_uvector< size_type > > 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...
nullable_join
The enum class to specify if any of the input join tables (build table and any later probe table) has...
std::size_t 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 specif...
std::pair< std::size_t, std::unique_ptr< rmm::device_uvector< size_type > > > 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 ta...
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > 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.
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::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 w...
std::size_t 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 speci...
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::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 w...
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > 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 w...
std::pair< std::size_t, std::unique_ptr< rmm::device_uvector< size_type > > > 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 t...
std::pair< std::unique_ptr< rmm::device_uvector< size_type > >, std::unique_ptr< rmm::device_uvector< size_type > > > 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.
std::size_t 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 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::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 i...
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
null_equality
Enum to consider two nulls as equal or unequal.
@ EQUAL
nulls compare equal
bool has_nulls(table_view const &view)
Returns True if the table has nulls in any of its columns.
A generic expression that can be evaluated to return a value.
Device version of C++20 std::span with reduced feature set.
Class definitions for (mutable)_table_view
Type declarations for libcudf.