Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
291 commits
Select commit Hold shift + click to select a range
2e5d41a
Rewrite comments
ttnghia Jun 8, 2022
8393809
Reverse tests
ttnghia Jun 8, 2022
5cdefa3
Fix old tests
ttnghia Jun 8, 2022
3626efb
Add a new overload for `cudf::distinct`
ttnghia Jun 8, 2022
bcc4abe
Reverse back breaking changes
ttnghia Jun 8, 2022
edbcc78
Fix compile error
ttnghia Jun 8, 2022
2f1ce5a
Reverse benchmark
ttnghia Jun 8, 2022
882a67a
Complete `StringKeyColumn` tests
ttnghia Jun 8, 2022
cdae2ac
Fix tests
ttnghia Jun 8, 2022
5b21d88
Fix tests
ttnghia Jun 8, 2022
3f18057
Rename function
ttnghia Jun 9, 2022
21456e7
Add `NonNullTable` tests
ttnghia Jun 9, 2022
8a17581
Add `SlicedNonNullTable` tests
ttnghia Jun 9, 2022
e05ad48
Add `InputWithNulls` tests
ttnghia Jun 9, 2022
03fb093
Change variable
ttnghia Jun 9, 2022
3c12942
Refactor
ttnghia Jun 9, 2022
6ab9673
Add `BasicList` tests
ttnghia Jun 9, 2022
37dfdcb
Add `NullableLists` tests
ttnghia Jun 9, 2022
b78cf5b
Add `ListsOfStructs` tests
ttnghia Jun 9, 2022
8de0948
Add `SlicedStructsOfLists` tests
ttnghia Jun 9, 2022
9e8c4a5
Misc
ttnghia Jun 9, 2022
7fa65ee
Add `ListsOfEmptyStructs` tests
ttnghia Jun 9, 2022
ff6e03e
Modify `EmptyDeepList` tests
ttnghia Jun 9, 2022
374545a
Add `StructsOfLists` tests
ttnghia Jun 9, 2022
9bf540a
Use `distinct` in Cython
ttnghia Jun 9, 2022
e1c3cd5
Merge branch 'branch-22.08' into refactor_stream_compaction
ttnghia Jun 9, 2022
70d3164
Fix Python style
ttnghia Jun 9, 2022
bba15c2
Revert "Fix Python style"
ttnghia Jun 9, 2022
d895f48
Revert "Use `distinct` in Cython"
ttnghia Jun 9, 2022
56e791c
Fix compiling errors due to merging
ttnghia Jun 10, 2022
fff65c1
Add doxygen group
ttnghia Jun 10, 2022
6ffc9b0
Fix doxygen
ttnghia Jun 10, 2022
dd8c845
Rewrite comment and rename variable
ttnghia Jun 10, 2022
0dcff06
Use customized cuco
ttnghia Jun 10, 2022
4d2ce5c
Cleanup
ttnghia Jun 10, 2022
c06f1b9
Merge branch 'branch-22.08' into set_operations
ttnghia Jun 10, 2022
361464f
Reimplement `set_overlap`
ttnghia Jun 10, 2022
f74c3c8
Reimplement `set_intersect`
ttnghia Jun 10, 2022
27aaa6e
Reimplement `set_difference`
ttnghia Jun 10, 2022
1a41c0d
Fix all compile errors
ttnghia Jun 11, 2022
dc2754f
Support `nan_equality` in `create_map`
ttnghia Jun 11, 2022
e7b3022
Support `nan_equality` in `check_contains`
ttnghia Jun 11, 2022
a0046f5
Drop duplicate from the results
ttnghia Jun 11, 2022
22f38c0
Support most functionalities
ttnghia Jun 12, 2022
1963a3c
Use `pair_contains`
ttnghia Jun 12, 2022
b4a5dc6
Unify function
ttnghia Jun 12, 2022
b77beb9
Add comments
ttnghia Jun 12, 2022
450f638
Reorganize code
ttnghia Jun 12, 2022
cb8119b
Fixing null mask
ttnghia Jun 12, 2022
e60c81c
Avoid inserting nulls if compare unequal
ttnghia Jun 12, 2022
79f7906
Remove added code
ttnghia Jun 12, 2022
326f8d4
Add member function interface
ttnghia Jun 13, 2022
26958d5
Fix stale comment
ttnghia Jun 13, 2022
5a22c2b
Initial implementation
ttnghia Jun 13, 2022
910e05f
Switch to use new implementation
ttnghia Jun 14, 2022
e4622b1
All test passed
ttnghia Jun 14, 2022
be85cd2
Add public and detail API
ttnghia Jun 14, 2022
f299f4f
Cleanup and add comments
ttnghia Jun 14, 2022
82dc340
Fix style
ttnghia Jun 14, 2022
15c8daf
Rename function and variables
ttnghia Jun 14, 2022
5ae3ef8
Fix a serious bug
ttnghia Jun 14, 2022
58fb9d7
Optimize null insertion
ttnghia Jun 14, 2022
933d650
Remove constructor
ttnghia Jun 14, 2022
ee77c27
Misc
ttnghia Jun 14, 2022
3599820
WIP
ttnghia Jun 14, 2022
edc7897
Fix a bug in accumulating nested columns
ttnghia Jun 14, 2022
cb28355
Fix error that makes tests failed
ttnghia Jun 15, 2022
d9c0ab9
Address review comments
ttnghia Jun 15, 2022
7770265
Remove one overload
ttnghia Jun 15, 2022
96a36c4
Fix benchmark
ttnghia Jun 16, 2022
0210228
Rename struct, and use CTAD
ttnghia Jun 16, 2022
65190cc
Add comment
ttnghia Jun 16, 2022
a4db720
Rename variable
ttnghia Jun 16, 2022
7e0315b
Remove added code
ttnghia Jun 16, 2022
126886b
Update cuco
ttnghia Jun 16, 2022
b5a7450
Reverse changes
ttnghia Jun 16, 2022
6c90c53
Add a parameter
ttnghia Jun 16, 2022
4cc2f2e
Fix compiling errors
ttnghia Jun 16, 2022
55895e7
WIP
ttnghia Jun 16, 2022
df05dc8
Misc
ttnghia Jun 16, 2022
ec48856
Merge branch 'refactor_stream_compaction' into distinct_with_nans_equ…
ttnghia Jun 16, 2022
5f7d778
WIP
ttnghia Jun 16, 2022
154645a
Rewrite doxygen
ttnghia Jun 16, 2022
8f04d50
Remove `keys` parameter from `get_distinct_indices`
ttnghia Jun 16, 2022
d806278
Rewrite doxygen
ttnghia Jun 16, 2022
3734344
Use another version of `gather`
ttnghia Jun 16, 2022
f731d35
Fix wrong doxygen
ttnghia Jun 16, 2022
e44c85d
Fix wrong doxygen again
ttnghia Jun 16, 2022
a74f71e
Misc
ttnghia Jun 16, 2022
f9de181
Update doxygen
ttnghia Jun 16, 2022
a339d83
Merge branch 'refactor_stream_compaction' into distinct_with_nans_equ…
ttnghia Jun 16, 2022
68652f4
Implementation is complete
ttnghia Jun 16, 2022
6cec1eb
Define hash_map and add todo
ttnghia Jun 16, 2022
661400a
Rename variable
ttnghia Jun 17, 2022
700e465
Fix doxygen
ttnghia Jun 17, 2022
1c783e8
Rename tests
ttnghia Jun 17, 2022
64e03f6
Merge branch 'refactor_stream_compaction' into distinct_with_nans_equ…
ttnghia Jun 17, 2022
13ad653
Add `NoNullsTableWithNans` test
ttnghia Jun 17, 2022
7811611
Add `InputWithNullsAndNaNs` tests
ttnghia Jun 17, 2022
47c5eec
Fix a bug when comparing nulls as unequal
ttnghia Jun 18, 2022
4db34db
Add `InputWithNullsUnequal` tests
ttnghia Jun 19, 2022
fab367b
Add `ListsWithNullsUnequal` tests
ttnghia Jun 19, 2022
9ec27af
Rewrite doxygen
ttnghia Jun 19, 2022
1359ee0
Rewrite doxygen for `duplicate_keep_option` and add back performance …
ttnghia Jun 19, 2022
aa0a4ed
Remove redundant docsc
ttnghia Jun 19, 2022
01e03b6
Rename functor
ttnghia Jun 20, 2022
cdc3000
Modify comments
ttnghia Jun 20, 2022
45dec2a
Merge branch 'branch-22.08' into refactor_stream_compaction
ttnghia Jun 20, 2022
16ba20c
Add header
ttnghia Jun 20, 2022
37a23e4
Merge branch 'refactor_stream_compaction' into distinct_with_nans_equ…
ttnghia Jun 20, 2022
38603fc
Merge remote-tracking branch 'nghia/fix_compile_errors' into distinct…
ttnghia Jun 20, 2022
e32daf4
Add `InputWithNaNs*` tests
ttnghia Jun 20, 2022
cba4759
Merge branch 'branch-22.08' into refactor_stream_compaction
ttnghia Jun 20, 2022
7247101
Attempt to split files, not yet cleanup
ttnghia Jun 20, 2022
120377b
Cleanup
ttnghia Jun 20, 2022
68133d4
Change functor name
ttnghia Jun 20, 2022
aefdadf
Add doxygen
ttnghia Jun 20, 2022
faf6778
Reorganize code
ttnghia Jun 20, 2022
e839323
Fix headers
ttnghia Jun 20, 2022
f5646b3
Fix header
ttnghia Jun 20, 2022
538ff08
Fix `mr` usage, and rewrite some comments
ttnghia Jun 21, 2022
8201835
Reverse `join.hpp` files
ttnghia Jun 21, 2022
54d6e35
Write doxygen
ttnghia Jun 21, 2022
8149a08
Add new source file
ttnghia Jun 21, 2022
0cd9bd6
Complete implementation
ttnghia Jun 21, 2022
9254612
Cleanup headers
ttnghia Jun 21, 2022
e456b0b
Add headers
ttnghia Jun 21, 2022
bb703c6
Temporary use a cuco commit
ttnghia Jun 21, 2022
a755bea
Pass `std::shared_ptr` by value
ttnghia Jun 21, 2022
61df0ac
Rename lambda
ttnghia Jun 21, 2022
136b490
Merge branch 'branch-22.08' into refactor_semijoin
ttnghia Jun 21, 2022
9c2fb25
Draft for doxygen
ttnghia Jun 21, 2022
b8d43dc
Implement `check_compatibility`
ttnghia Jun 21, 2022
a2db48b
Using `pair_contains_if`
ttnghia Jun 21, 2022
d66a213
Update cuco
ttnghia Jun 21, 2022
adf8965
Fix null handling
ttnghia Jun 22, 2022
f0ee266
Fix doxygen and change function name
ttnghia Jun 22, 2022
0b35671
Update doxygen
ttnghia Jun 22, 2022
9320cf3
Fix nan handling
ttnghia Jun 22, 2022
29599b4
Merge branch 'branch-22.08' into refactor_semijoin
ttnghia Jun 22, 2022
db886ea
Merge branch 'refactor_stream_compaction' into distinct_with_nans_equ…
ttnghia Jun 22, 2022
1ac6501
Merge branch 'branch-22.08' into refactor_stream_compaction
ttnghia Jun 22, 2022
d0af0e6
Merge branch 'refactor_stream_compaction' into distinct_with_nans_equ…
ttnghia Jun 22, 2022
9ddcc93
Add column into benchmark
ttnghia Jun 22, 2022
f712db6
Set benchmark min time
ttnghia Jun 22, 2022
29d15d4
Don't check for nulls of the needles table
ttnghia Jun 22, 2022
a4d15d6
Use asterisk
ttnghia Jun 22, 2022
ec00f0a
Remove redundant variable
ttnghia Jun 22, 2022
be3b2fe
Merge branch 'branch-22.08' into distinct_with_nans_equality
ttnghia Jun 22, 2022
c121268
Remove redundant declaration
ttnghia Jun 22, 2022
2410c08
Change default behavior
ttnghia Jun 22, 2022
489060f
Merge branch 'branch-22.08' into set_operations
ttnghia Jun 22, 2022
7ee00ad
Rename function
ttnghia Jun 22, 2022
d3c404e
Merge branch 'distinct_with_nans_equality' into set_operations
ttnghia Jun 22, 2022
a3b2539
Fix compile errors
ttnghia Jun 22, 2022
c2c9a30
Remove temporary function
ttnghia Jun 22, 2022
fc40b55
Merge branch 'refactor_semijoin' into set_operations
ttnghia Jun 22, 2022
137d2ae
Remove all temporary functions
ttnghia Jun 22, 2022
58d36df
Rewrite `list_distinct`
ttnghia Jun 22, 2022
9a29248
Rewrite `list_overlap`
ttnghia Jun 22, 2022
84df3c5
Rewrite `set_intersect`
ttnghia Jun 22, 2022
c72b406
Rewrite `set_union`
ttnghia Jun 22, 2022
10e26b0
Rewrite all
ttnghia Jun 22, 2022
25d2635
Add detail header
ttnghia Jun 22, 2022
4fd850b
Change default value for nan comparison
ttnghia Jun 22, 2022
6436a54
Fix compile error
ttnghia Jun 22, 2022
f488969
Merge branch 'branch-22.08' into set_operations
ttnghia Jun 23, 2022
613e9ba
Update meta.yaml
ttnghia Jun 23, 2022
75e567d
Write more doxygen
ttnghia Jun 23, 2022
acf7bc9
Misc
ttnghia Jun 23, 2022
f5769ae
Rename file
ttnghia Jun 23, 2022
4354312
Add headers for test files
ttnghia Jun 23, 2022
f181ac2
Merge branch 'branch-22.08' into set_operations
ttnghia Jun 23, 2022
14d4f68
Add `TrivialTest` tests
ttnghia Jun 23, 2022
6925c02
Fix label generation
ttnghia Jun 23, 2022
541ebf9
Generate labels with nullmask
ttnghia Jun 23, 2022
da3f525
Revert "Generate labels with nullmask"
ttnghia Jun 23, 2022
6a28643
Fix validity check
ttnghia Jun 23, 2022
f901e39
Fix non-empty null lists
ttnghia Jun 23, 2022
814522d
All tests pass
ttnghia Jun 23, 2022
aecdf31
Merge branch 'branch-22.08' into set_operations
ttnghia Jun 23, 2022
55bfa69
Add C++ JNI
ttnghia Jun 23, 2022
ee53dfc
Add Java APIs
ttnghia Jun 23, 2022
aebf434
Add comments
ttnghia Jun 24, 2022
9266be4
Add doxygen
ttnghia Jun 24, 2022
4571c6d
Rewrite doxygen
ttnghia Jun 24, 2022
c0ac406
Rename function
ttnghia Jun 24, 2022
3a32498
Rename function
ttnghia Jun 24, 2022
f3a4e84
Add `utilities.*` files
ttnghia Jun 24, 2022
2b7386c
Extract `distinct`
ttnghia Jun 24, 2022
c8f3da0
Add test file for `cudf::lists::distinct`
ttnghia Jun 24, 2022
1d7e8e0
Add new implementation and test files
ttnghia Jun 24, 2022
51b80db
Fix compile error
ttnghia Jun 24, 2022
08a76ad
Rename function
ttnghia Jun 27, 2022
16101f7
Implement `cudf::detail::stable_distinct` and `lists::distinct`
ttnghia Jun 27, 2022
5ec13d6
Rewrite doxygen
ttnghia Jun 27, 2022
6c5b738
Rename variable
ttnghia Jun 27, 2022
5b70eee
Rewrite comment
ttnghia Jun 27, 2022
238248d
Rename files
ttnghia Jun 27, 2022
ba6bf6b
Implement float tests
ttnghia Jun 27, 2022
3845c95
Implement string tests
ttnghia Jun 27, 2022
507c82d
Implement tests for `ListDistinctTypedTest`
ttnghia Jun 28, 2022
2cb8347
Complete the remaining tests
ttnghia Jun 28, 2022
7efdea0
Merge branch 'branch-22.08' into add_lists_distinct
ttnghia Jun 28, 2022
4388637
Rewrite doxygen
ttnghia Jun 28, 2022
277c110
Merge branch 'add_lists_distinct' into set_operations
ttnghia Jun 28, 2022
1992561
Rewrite all
ttnghia Jun 28, 2022
818c85f
Fix compatibility check
ttnghia Jun 28, 2022
66e28ca
Misc
ttnghia Jun 28, 2022
279f04e
Remove files
ttnghia Jun 28, 2022
ee334c1
Implement floating point tests
ttnghia Jun 28, 2022
434d35c
Fix a bug
ttnghia Jun 28, 2022
99d526b
Add string tests
ttnghia Jun 28, 2022
66fce07
Implement typed tests
ttnghia Jun 28, 2022
8e2ff3d
Implement nested structs tests
ttnghia Jun 28, 2022
d4b7d6c
Cleanup
ttnghia Jun 28, 2022
669aa9e
Implement floating point tests and string tests
ttnghia Jun 29, 2022
f42a976
Implement typed tests
ttnghia Jun 29, 2022
e63b27d
Misc
ttnghia Jun 29, 2022
f0d839a
Implement nested structs tests
ttnghia Jun 29, 2022
21654db
Add blank lines
ttnghia Jun 29, 2022
ae36981
Implement `set_intersect_tests`
ttnghia Jun 29, 2022
b087720
Misc
ttnghia Jun 29, 2022
7a07e2c
Implement `set_union_tests`
ttnghia Jun 29, 2022
0f8f8e2
Remove files
ttnghia Jun 29, 2022
38b50bc
Rename files
ttnghia Jun 29, 2022
35cba3a
Fix a bug
ttnghia Jun 29, 2022
55fc6e5
Update default stream
ttnghia Jun 30, 2022
fa286a6
Add identity tests
ttnghia Jun 30, 2022
5764ae0
Merge branch 'branch-22.08' into set_operations
ttnghia Jun 30, 2022
678377d
Merge branch 'set_operations' into set_ops_jni
ttnghia Jun 30, 2022
1fceafd
Change default value for `list_overlap`
ttnghia Jul 5, 2022
2e8271b
Explicitly specify null and nan comparison parameters
ttnghia Jul 5, 2022
faa4048
Fix doxygen
ttnghia Jul 5, 2022
a24e206
Add Javadoc
ttnghia Jul 5, 2022
e7702a8
Add Java tests
ttnghia Jul 5, 2022
b2790dc
Modify comments
ttnghia Jul 6, 2022
21083e3
Add special post-processing for `list_overlap`
ttnghia Jul 7, 2022
2849114
Fix null handling error
ttnghia Jul 7, 2022
4cd3ba3
Optimize post-processing
ttnghia Jul 7, 2022
e192914
Add comment
ttnghia Jul 7, 2022
c639636
Merge branch 'branch-22.08' into set_ops_jni
ttnghia Jul 8, 2022
34465fc
Combine code
ttnghia Jul 8, 2022
374ed1f
Merge branch 'branch-22.08' into set_ops_jni
ttnghia Jul 26, 2022
e5c3803
Still resolve merge conflict
ttnghia Jul 26, 2022
949c875
Change function names
ttnghia Jul 26, 2022
638e52c
Fix typo
ttnghia Jul 26, 2022
272df92
Fix doxygen
ttnghia Jul 26, 2022
1ea9877
Remove empty line
ttnghia Jul 28, 2022
711ad52
Merge branch 'branch-22.08' into set_ops_jni
ttnghia Jul 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove all temporary functions
Signed-off-by: Nghia Truong <nghiatruong.vn@gmail.com>
  • Loading branch information
ttnghia committed Jun 22, 2022
commit 137d2aedcc89ff2c6839686e174d2cd40661c158
13 changes: 7 additions & 6 deletions cpp/include/cudf/detail/search.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,13 @@ std::unique_ptr<column> contains(column_view const& haystack,
* @param mr Device memory resource used to allocate the returned vector
* @return A vector of bools indicating if each row in `needles` has matching rows in `haystack`
*/
rmm::device_uvector<bool> contains(table_view const& haystack,
table_view const& needles,
null_equality compare_nulls,
nan_equality compare_nans,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);
rmm::device_uvector<bool> contains(
table_view const& haystack,
table_view const& needles,
null_equality compare_nulls,
nan_equality compare_nans,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());

/**
* @brief Check if the (unique) row of the `needle` column is contained in the `haystack` column.
Expand Down
136 changes: 6 additions & 130 deletions cpp/src/lists/set_operations.cu
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <cudf/detail/labeling/label_segments.cuh>
#include <cudf/detail/null_mask.hpp>
#include <cudf/detail/nvtx/ranges.hpp>
#include <cudf/detail/search.hpp>
#include <cudf/detail/stream_compaction.hpp>
#include <cudf/lists/combine.hpp>
#include <cudf/lists/set_operations.hpp>
Expand All @@ -48,133 +49,6 @@

namespace cudf::lists {
namespace detail {
namespace {

using cudf::experimental::row::lhs_index_type;
using cudf::experimental::row::rhs_index_type;

using hash_multimap = cuco::static_multimap<hash_value_type,
lhs_index_type,
cuda::thread_scope_device,
cudf::detail::hash_table_allocator_type>;

using nan_equal_comparator =
cudf::experimental::row::equality::nan_equal_physical_equality_comparator;
using nan_unequal_comparator = cudf::experimental::row::equality::physical_equality_comparator;

std::unique_ptr<column> generate_labels(lists_column_view const& input,
rmm::cuda_stream_view stream);

std::unique_ptr<column> reconstruct_offsets(column_view const& labels,
size_type n_rows,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);
} // namespace

// This namespace contains code borrow from other WIP PRs, will be removed when they merged.
namespace temporary {

template <typename Comparator>
struct pair_comparator_fn {
Comparator const d_eqcomp;
using LHSPair = cuco::pair<hash_value_type, lhs_index_type>;
using RHSPair = cuco::pair<hash_value_type, rhs_index_type>;

__device__ bool operator()(LHSPair const& lhs_hash_and_index,
RHSPair const& rhs_hash_and_index) const noexcept
{
auto const& [lhs_hash, lhs_index] = lhs_hash_and_index;
auto const& [rhs_hash, rhs_index] = rhs_hash_and_index;
return lhs_hash == rhs_hash ? d_eqcomp(lhs_index, rhs_index) : false;
}
};

/**
* @brief Check the existence of rows in the rhs table in the hash map, which was created by rows
* of the lhs table.
*
* Note: This need to be implemented in semi-anti-join
* https://github.com/rapidsai/cudf/issues/11037
*/
rmm::device_uvector<bool> contains(table_view const& lhs,
table_view const& rhs,
null_equality nulls_equal,
nan_equality nans_equal,
rmm::cuda_stream_view stream)
{
auto map = std::make_unique<hash_multimap>(
compute_hash_table_size(lhs.num_rows()),
cuco::sentinel::empty_key{hash_value_type{cudf::detail::COMPACTION_EMPTY_KEY_SENTINEL}},
cuco::sentinel::empty_value{lhs_index_type{cudf::detail::COMPACTION_EMPTY_VALUE_SENTINEL}},
stream.value(),
cudf::detail::hash_table_allocator_type{default_allocator<char>{}, stream});

auto const lhs_has_nulls = has_nested_nulls(lhs);
auto const rhs_has_nulls = has_nested_nulls(rhs);

// Create a hash map with keys are indices of all elements in the input column.
// todo: avoid inserting nulls
{
auto const hasher = cudf::experimental::row::hash::row_hasher(lhs, stream);
auto const d_hasher = cudf::detail::experimental::compaction_hash(
hasher.device_hasher(nullate::DYNAMIC{lhs_has_nulls}));

auto const kv_it = cudf::detail::make_counting_transform_iterator(
size_type{0}, [d_hasher] __device__(size_type const i) {
return cuco::make_pair(d_hasher(i), lhs_index_type{i});
});

if ((nulls_equal == null_equality::EQUAL) || !lhs_has_nulls) {
map->insert(kv_it, kv_it + lhs.num_rows(), stream.value());
} else {
[[maybe_unused]] auto const [row_bitmask, tmp] = cudf::detail::bitmask_and(lhs, stream);

map->insert_if(
kv_it,
kv_it + lhs.num_rows(),
thrust::counting_iterator<size_type>(0), // stencil
[row_bitmask = static_cast<bitmask_type const*>(row_bitmask.data())] __device__(
size_type const i) { return cudf::bit_is_set(row_bitmask, i); },
stream.value());
}
}

auto contained = rmm::device_uvector<bool>(rhs.num_rows(), stream);

{
auto const hasher = cudf::experimental::row::hash::row_hasher(rhs, stream);
auto const d_hasher = cudf::detail::experimental::compaction_hash(
hasher.device_hasher(nullate::DYNAMIC{rhs_has_nulls}));

auto const rhs_it = cudf::detail::make_counting_transform_iterator(
size_type{0}, [d_hasher] __device__(size_type const i) {
return cuco::make_pair(d_hasher(i), rhs_index_type{i});
});

auto const comparator =
cudf::experimental::row::equality::two_table_comparator(lhs, rhs, stream);

auto const do_check = [&](auto const& value_comp) {
auto const d_eqcomp = comparator.equal_to(
nullate::DYNAMIC{lhs_has_nulls || rhs_has_nulls}, nulls_equal, value_comp);
map->pair_contains(rhs_it,
rhs_it + rhs.num_rows(),
contained.begin(),
pair_comparator_fn<decltype(d_eqcomp)>{d_eqcomp},
stream.value());
};

if (nans_equal == nan_equality::ALL_EQUAL) {
do_check(nan_equal_comparator{});
} else {
do_check(nan_unequal_comparator{});
}
}

return contained;
}

} // namespace temporary

namespace {

Expand Down Expand Up @@ -294,7 +168,8 @@ std::unique_ptr<column> list_overlap(lists_column_view const& lhs,
auto const rhs_table = table_view{{rhs_labels->view(), rhs_child}};

// todo handle nans
auto const contained = temporary::contains(lhs_table, rhs_table, nulls_equal, nans_equal, stream);
auto const contained =
cudf::detail::contains(lhs_table, rhs_table, nulls_equal, nans_equal, stream);

// This stores the unique label values, used as scatter map.
auto list_indices = rmm::device_uvector<size_type>(lhs.size(), stream);
Expand Down Expand Up @@ -358,7 +233,8 @@ std::unique_ptr<column> set_intersect(lists_column_view const& lhs,
auto const rhs_table = table_view{{rhs_labels->view(), rhs_child}};

// todo handle nans
auto const contained = temporary::contains(lhs_table, rhs_table, nulls_equal, nans_equal, stream);
auto const contained =
cudf::detail::contains(lhs_table, rhs_table, nulls_equal, nans_equal, stream);

auto const intersect_table = cudf::detail::copy_if(
rhs_table,
Expand Down Expand Up @@ -435,7 +311,7 @@ std::unique_ptr<column> set_difference(lists_column_view const& lhs,
auto const rhs_table = table_view{{rhs_labels->view(), rhs_child}};

auto const inv_contained = [&] {
auto contained = temporary::contains(rhs_table, lhs_table, nulls_equal, nans_equal, stream);
auto contained = cudf::detail::contains(rhs_table, lhs_table, nulls_equal, nans_equal, stream);
thrust::transform(rmm::exec_policy(stream),
contained.begin(),
contained.end(),
Expand Down