join.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2024, 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>
20 #include <cudf/hashing.hpp>
22 #include <cudf/types.hpp>
24 #include <cudf/utilities/span.hpp>
25 
26 #include <rmm/cuda_stream_view.hpp>
27 #include <rmm/device_uvector.hpp>
28 #include <rmm/mr/device/per_device_resource.hpp>
29 #include <rmm/resource_ref.hpp>
30 
31 #include <optional>
32 #include <utility>
33 #include <vector>
34 
35 namespace cudf {
36 
42 enum class has_nested : bool { YES, NO };
43 
44 // forward declaration
45 namespace hashing::detail {
46 template <typename T>
48 } // namespace hashing::detail
49 namespace detail {
50 template <typename T>
51 class hash_join;
52 
53 template <cudf::has_nested HasNested>
55 } // namespace detail
56 
95 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
96  std::unique_ptr<rmm::device_uvector<size_type>>>
97 inner_join(cudf::table_view const& left_keys,
98  cudf::table_view const& right_keys,
99  null_equality compare_nulls = null_equality::EQUAL,
100  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
101 
135 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
136  std::unique_ptr<rmm::device_uvector<size_type>>>
137 left_join(cudf::table_view const& left_keys,
138  cudf::table_view const& right_keys,
139  null_equality compare_nulls = null_equality::EQUAL,
140  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
141 
174 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
175  std::unique_ptr<rmm::device_uvector<size_type>>>
176 full_join(cudf::table_view const& left_keys,
177  cudf::table_view const& right_keys,
178  null_equality compare_nulls = null_equality::EQUAL,
179  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
180 
203 std::unique_ptr<rmm::device_uvector<size_type>> left_semi_join(
204  cudf::table_view const& left_keys,
205  cudf::table_view const& right_keys,
206  null_equality compare_nulls = null_equality::EQUAL,
207  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
208 
234 std::unique_ptr<rmm::device_uvector<size_type>> left_anti_join(
235  cudf::table_view const& left_keys,
236  cudf::table_view const& right_keys,
237  null_equality compare_nulls = null_equality::EQUAL,
238  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
239 
262 std::unique_ptr<cudf::table> cross_join(
263  cudf::table_view const& left,
264  cudf::table_view const& right,
265  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
266 
275 enum class nullable_join : bool { YES, NO };
276 
284 class hash_join {
285  public:
288 
289  hash_join() = delete;
290  ~hash_join();
291  hash_join(hash_join const&) = delete;
292  hash_join(hash_join&&) = delete;
293  hash_join& operator=(hash_join const&) = delete;
294  hash_join& operator=(hash_join&&) = delete;
295 
307  null_equality compare_nulls,
308  rmm::cuda_stream_view stream = cudf::get_default_stream());
309 
318  null_equality compare_nulls,
319  rmm::cuda_stream_view stream = cudf::get_default_stream());
320 
339  [[nodiscard]] std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
340  std::unique_ptr<rmm::device_uvector<size_type>>>
342  std::optional<std::size_t> output_size = {},
343  rmm::cuda_stream_view stream = cudf::get_default_stream(),
344  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const;
345 
364  [[nodiscard]] std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
365  std::unique_ptr<rmm::device_uvector<size_type>>>
367  std::optional<std::size_t> output_size = {},
368  rmm::cuda_stream_view stream = cudf::get_default_stream(),
369  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const;
370 
389  [[nodiscard]] std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
390  std::unique_ptr<rmm::device_uvector<size_type>>>
392  std::optional<std::size_t> output_size = {},
393  rmm::cuda_stream_view stream = cudf::get_default_stream(),
394  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const;
395 
409  [[nodiscard]] std::size_t inner_join_size(
410  cudf::table_view const& probe, rmm::cuda_stream_view stream = cudf::get_default_stream()) const;
411 
425  [[nodiscard]] std::size_t left_join_size(
426  cudf::table_view const& probe, rmm::cuda_stream_view stream = cudf::get_default_stream()) const;
427 
443  [[nodiscard]] std::size_t full_join_size(
444  cudf::table_view const& probe,
445  rmm::cuda_stream_view stream = cudf::get_default_stream(),
446  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const;
447 
448  private:
449  const std::unique_ptr<impl_type const> _impl;
450 };
451 
461 // TODO: `HasNested` to be removed via dispatching
462 template <cudf::has_nested HasNested>
464  public:
465  distinct_hash_join() = delete;
467  distinct_hash_join(distinct_hash_join const&) = delete;
469  distinct_hash_join& operator=(distinct_hash_join const&) = delete;
470  distinct_hash_join& operator=(distinct_hash_join&&) = delete;
471 
483  cudf::table_view const& probe,
484  nullable_join has_nulls = nullable_join::YES,
485  null_equality compare_nulls = null_equality::EQUAL,
486  rmm::cuda_stream_view stream = cudf::get_default_stream());
487 
499  [[nodiscard]] std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
500  std::unique_ptr<rmm::device_uvector<size_type>>>
501  inner_join(rmm::cuda_stream_view stream = cudf::get_default_stream(),
502  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const;
503 
519  [[nodiscard]] std::unique_ptr<rmm::device_uvector<size_type>> left_join(
520  rmm::cuda_stream_view stream = cudf::get_default_stream(),
521  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) const;
522 
523  private:
524  using impl_type = typename cudf::detail::distinct_hash_join<HasNested>;
525 
526  std::unique_ptr<impl_type> _impl;
527 };
528 
564 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
565  std::unique_ptr<rmm::device_uvector<size_type>>>
567  table_view const& right,
568  ast::expression const& binary_predicate,
569  std::optional<std::size_t> output_size = {},
570  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
571 
609 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
610  std::unique_ptr<rmm::device_uvector<size_type>>>
612  table_view const& right,
613  ast::expression const& binary_predicate,
614  std::optional<std::size_t> output_size = {},
615  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
616 
652 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
653  std::unique_ptr<rmm::device_uvector<size_type>>>
655  table_view const& right,
656  ast::expression const& binary_predicate,
657  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
658 
691 std::unique_ptr<rmm::device_uvector<size_type>> conditional_left_semi_join(
692  table_view const& left,
693  table_view const& right,
694  ast::expression const& binary_predicate,
695  std::optional<std::size_t> output_size = {},
696  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
697 
730 std::unique_ptr<rmm::device_uvector<size_type>> conditional_left_anti_join(
731  table_view const& left,
732  table_view const& right,
733  ast::expression const& binary_predicate,
734  std::optional<std::size_t> output_size = {},
735  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
736 
783 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
784  std::unique_ptr<rmm::device_uvector<size_type>>>
786  table_view const& left_equality,
787  table_view const& right_equality,
788  table_view const& left_conditional,
789  table_view const& right_conditional,
790  ast::expression const& binary_predicate,
791  null_equality compare_nulls = null_equality::EQUAL,
792  std::optional<std::pair<std::size_t, device_span<size_type const>>> output_size_data = {},
793  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
794 
843 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
844  std::unique_ptr<rmm::device_uvector<size_type>>>
846  table_view const& left_equality,
847  table_view const& right_equality,
848  table_view const& left_conditional,
849  table_view const& right_conditional,
850  ast::expression const& binary_predicate,
851  null_equality compare_nulls = null_equality::EQUAL,
852  std::optional<std::pair<std::size_t, device_span<size_type const>>> output_size_data = {},
853  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
854 
903 std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
904  std::unique_ptr<rmm::device_uvector<size_type>>>
906  table_view const& left_equality,
907  table_view const& right_equality,
908  table_view const& left_conditional,
909  table_view const& right_conditional,
910  ast::expression const& binary_predicate,
911  null_equality compare_nulls = null_equality::EQUAL,
912  std::optional<std::pair<std::size_t, device_span<size_type const>>> output_size_data = {},
913  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
914 
953 std::unique_ptr<rmm::device_uvector<size_type>> mixed_left_semi_join(
954  table_view const& left_equality,
955  table_view const& right_equality,
956  table_view const& left_conditional,
957  table_view const& right_conditional,
958  ast::expression const& binary_predicate,
959  null_equality compare_nulls = null_equality::EQUAL,
960  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
961 
1001 std::unique_ptr<rmm::device_uvector<size_type>> mixed_left_anti_join(
1002  table_view const& left_equality,
1003  table_view const& right_equality,
1004  table_view const& left_conditional,
1005  table_view const& right_conditional,
1006  ast::expression const& binary_predicate,
1007  null_equality compare_nulls = null_equality::EQUAL,
1008  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
1009 
1041 std::pair<std::size_t, std::unique_ptr<rmm::device_uvector<size_type>>> mixed_inner_join_size(
1042  table_view const& left_equality,
1043  table_view const& right_equality,
1044  table_view const& left_conditional,
1045  table_view const& right_conditional,
1046  ast::expression const& binary_predicate,
1047  null_equality compare_nulls = null_equality::EQUAL,
1048  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
1049 
1081 std::pair<std::size_t, std::unique_ptr<rmm::device_uvector<size_type>>> mixed_left_join_size(
1082  table_view const& left_equality,
1083  table_view const& right_equality,
1084  table_view const& left_conditional,
1085  table_view const& right_conditional,
1086  ast::expression const& binary_predicate,
1087  null_equality compare_nulls = null_equality::EQUAL,
1088  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
1089 
1108  table_view const& left,
1109  table_view const& right,
1110  ast::expression const& binary_predicate,
1111  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
1112 
1131  table_view const& left,
1132  table_view const& right,
1133  ast::expression const& binary_predicate,
1134  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
1135 
1154  table_view const& left,
1155  table_view const& right,
1156  ast::expression const& binary_predicate,
1157  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
1158 
1177  table_view const& left,
1178  table_view const& right,
1179  ast::expression const& binary_predicate,
1180  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()); // end of group
1182 } // namespace cudf
Distinct hash join that builds hash table in creation and probes results in subsequent *_join member ...
Definition: join.hpp:463
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=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 ...
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=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...
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...
Definition: join.hpp:284
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::device_async_resource_ref 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 > > > full_join(cudf::table_view const &probe, std::optional< std::size_t > output_size={}, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref 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::device_async_resource_ref mr=rmm::mr::get_current_device_resource()) const
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.
typename cudf::detail::hash_join< cudf::hashing::detail::MurmurHash3_x86_32< cudf::hash_value_type > > impl_type
Implementation type.
Definition: join.hpp:287
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 > > > inner_join(cudf::table_view const &probe, std::optional< std::size_t > output_size={}, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref 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.
Definition: table_view.hpp:187
std::size_t conditional_left_semi_join_size(table_view const &left, table_view const &right, ast::expression const &binary_predicate, rmm::device_async_resource_ref 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::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::device_async_resource_ref 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 > > 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, rmm::device_async_resource_ref 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...
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::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Returns a vector of row indices corresponding to a left semi-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::device_async_resource_ref 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_left_anti_join_size(table_view const &left, table_view const &right, ast::expression const &binary_predicate, rmm::device_async_resource_ref 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::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::device_async_resource_ref 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::device_async_resource_ref 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 > > > full_join(cudf::table_view const &left_keys, cudf::table_view const &right_keys, null_equality compare_nulls=null_equality::EQUAL, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Returns a pair of row index vectors corresponding to a full join between the specified tables.
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::device_async_resource_ref 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::size_t conditional_inner_join_size(table_view const &left, table_view const &right, ast::expression const &binary_predicate, rmm::device_async_resource_ref 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 > > > 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::device_async_resource_ref 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 > > left_anti_join(cudf::table_view const &left_keys, cudf::table_view const &right_keys, null_equality compare_nulls=null_equality::EQUAL, rmm::device_async_resource_ref 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 > > 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, rmm::device_async_resource_ref 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::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::device_async_resource_ref 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...
has_nested
Enum to indicate whether the distinct join table has nested columns or not.
Definition: join.hpp:42
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::device_async_resource_ref 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_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::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Returns the exact number of matches (rows) when performing a mixed left join between the specified ta...
nullable_join
The enum class to specify if any of the input join tables (build table and any later probe table) has...
Definition: join.hpp:275
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::device_async_resource_ref 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 > > > inner_join(cudf::table_view const &left_keys, cudf::table_view const &right_keys, null_equality compare_nulls=null_equality::EQUAL, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Returns a pair of row index vectors corresponding to an inner join between the specified tables.
std::unique_ptr< cudf::table > cross_join(cudf::table_view const &left, cudf::table_view const &right, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Performs a cross join on two tables (left, right)
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::device_async_resource_ref 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...
std::size_t conditional_left_join_size(table_view const &left, table_view const &right, ast::expression const &binary_predicate, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Returns the exact number of matches (rows) when performing a conditional left join between the specif...
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
null_equality
Enum to consider two nulls as equal or unequal.
Definition: types.hpp:149
@ EQUAL
nulls compare equal
cuDF interfaces
Definition: aggregation.hpp:34
bool has_nulls(table_view const &view)
Returns True if the table has nulls in any of its columns.
APIs for spans.
A generic expression that can be evaluated to return a value.
Definition: expressions.hpp:46
Device version of C++20 std::span with reduced feature set.
Definition: span.hpp:295
Class definitions for (mutable)_table_view
Type declarations for libcudf.