Repository navigation
Refactor cudf::contains, renaming and switching parameters role - #10802
Merged
rapids-bot[bot] merged 22 commits intoMay 10, 2022
Merged
Conversation
vuule
reviewed
May 6, 2022
vuule
left a comment
Contributor
There was a problem hiding this comment.
LGTM, with a few docs nitpicks.
davidwendt
reviewed
May 6, 2022
davidwendt
reviewed
May 6, 2022
Contributor
jrhemstad
approved these changes
May 6, 2022
jlowe
reviewed
May 9, 2022
jlowe
left a comment
Contributor
There was a problem hiding this comment.
Java unit tests are failing
jlowe
reviewed
May 9, 2022
jrhemstad
reviewed
May 9, 2022
jlowe
approved these changes
May 9, 2022
jlowe
left a comment
Contributor
There was a problem hiding this comment.
Minor const nits, but otherwise Java changes lgtm.
This comment was marked as off-topic.
This comment was marked as off-topic.
davidwendt
approved these changes
May 10, 2022
vyasr
requested changes
May 10, 2022
vyasr
left a comment
Contributor
There was a problem hiding this comment.
For completeness, we should also update the parameter names for the Python bindings for lower and upper bound in this file. Also the second parameter for contains looks like it should be needles, not needle. These bindings are like a C++ header in that they only export declarations, so the parameter names don't actually need to match the definition for the code to function correctly, but it will still be confusing to readers if they don't.
vyasr
approved these changes
May 10, 2022
Contributor
Author
|
@gpucibot merge |
rapids-bot Bot
pushed a commit
that referenced
this pull request
May 11, 2022
Compile warning introduced with merge of PR #10802 ``` 10 warnings like this: 12:43:23 $SRC_DIR/cpp/src/search/search.cu(108): warning #177-D: parameter "args" was declared but never referenced 12:43:23 detected during instantiation of function "lambda [](auto &&...)->auto [with <auto-1>=<rmm::exec_policy, const thrust::counting_iterator<cudf::size_type, thrust::use_default, thrust::use_default, thrust::use_default> &, thrust::counting_iterator<cudf::size_type, thrust::use_default, thrust::use_default, thrust::use_default>, const thrust::counting_iterator<cudf::size_type, thrust::use_default, thrust::use_default, thrust::use_default> &, thrust::counting_iterator<cudf::size_type, thrust::use_default, thrust::use_default, thrust::use_default>, cudf::size_type *const &, const cudf::row_lexicographic_comparator<cudf::nullate::DYNAMIC> &>]" 12:43:23 (121): here ``` Line 108 has a lambda refactoring that seems to confuse the compiler. ``` auto const do_search = [find_first](auto&&... args) { if (find_first) { thrust::lower_bound(std::forward<decltype(args)>(args)...); } else { thrust::upper_bound(std::forward<decltype(args)>(args)...); } }; do_search(rmm::exec_policy(stream), count_it, count_it + haystack.num_rows(), count_it, count_it + needles.num_rows(), out_it, comp); ``` The warning is wrong and the compiler generates the correct code so this is likely a compiler bug. This PR fixes the warning by replacing the lambda with an if statement. Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Nghia Truong (https://github.com/ttnghia) - Yunsong Wang (https://github.com/PointKernel) URL: #10827
rapids-bot Bot
pushed a commit
that referenced
this pull request
Aug 17, 2022
This extends the `cudf::contains` API to support nested types (lists + structs) with arbitrarily nested levels. As such, `cudf::contains` will work with literally any type of input data. In addition, this fixes null handling of `cudf::contains` with structs column + struct scalar input when the structs column contains null rows at the top level while the scalar key is valid but all nulls at children levels. Closes: #8965 Depends on: * #10730 * #10883 * #10802 * #10997 * NVIDIA/cuCollections#172 * NVIDIA/cuCollections#173 * #11037 * #11356 Authors: - Nghia Truong (https://github.com/ttnghia) - Devavret Makkar (https://github.com/devavret) - Bradley Dice (https://github.com/bdice) - Karthikeyan (https://github.com/karthikeyann) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Bradley Dice (https://github.com/bdice) - Yunsong Wang (https://github.com/PointKernel) URL: #10656
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR does the following:
cudf::contains, changing fromt/values,col/value, etc... intohaystack/needlein a consistent way.haystackandneedlesparameters of the overloadcudf::contains(column_view, column_view), which incorrectly searches forhaystackinsideneedles.cudf::containsdoxygen.Since the role of parameters is switched, this causes breaking changes.
Closes #10725. In addition, this is also a foundation for more changes in
search.cuto support nested types in #10656.