-
Notifications
You must be signed in to change notification settings - Fork 1k
Support contains() on lists of primitives #7039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
dd01ba1
Support contains() on lists of primitives
mythrocks 4558261
Support contains() on lists of primitives
mythrocks a87ffb0
Support contains() on lists of primitives
mythrocks 21aae8a
Support contains() on lists of primitives
mythrocks 4e5b819
Support contains() on lists of primitives:
mythrocks 752379a
Support contains() on lists of primitives:
mythrocks 551c014
Support contains() on lists of primitives:
mythrocks 36ffde8
Support contains() on lists of primitives:
mythrocks 2e7d725
Merge remote-tracking branch 'origin/branch-0.18' into list-contains
mythrocks 80510cf
Merge remote-tracking branch 'origin/branch-0.18' into list-contains
mythrocks f9bb045
Merge remote-tracking branch 'origin/branch-0.18' into list-contains
mythrocks f880b46
Support contains() on lists of primitives:
mythrocks ce92cc5
Support contains() on lists of primitives
mythrocks 9c92bf8
Support contains() on lists of primitives
mythrocks 542e39a
Support contains() on lists of primitives:
mythrocks 0a60a12
Support contains() on lists of primitives
mythrocks 63d1a4a
Chrono support in lists::contains()
mythrocks ed9269f
Added validity iterator for scalars.
mythrocks 2d469b7
Collapsed construct_null_mask() single function
mythrocks a398bb6
Merge remote-tracking branch 'origin/branch-0.18' into list-contains
mythrocks 6ebed08
Collapsed contains() implementation to one impl function
mythrocks e01e860
Renamed search_key_has_all_nulls
mythrocks 21d06e9
Merge remote-tracking branch 'origin/branch-0.18' into list-contains
mythrocks 792bd86
Fixed behaviour for lists containing nulls:
mythrocks bb800a7
Cleaned up SFINAE is_supported().
mythrocks 1210f83
Remove names for unused function/template parameters.
mythrocks c77d1a1
Code formatting.
mythrocks 21bd39d
Fixed documentation for make_validity_iterator(scalar)
mythrocks 793863a
Added Doxygen directives.
mythrocks b0ad781
Merge remote-tracking branch 'origin/branch-0.18' into list-contains
mythrocks 4225a62
Move namespace directives to file level.
mythrocks f7d4bad
Merge remote-tracking branch 'origin/branch-0.18' into list-contains
mythrocks d6ddee0
Fix doxygen_groups.h lists_contains group
mythrocks b3b5b6c
Move tests to namespace.
mythrocks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| /* | ||
| * Copyright (c) 2021, NVIDIA CORPORATION. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| #pragma once | ||
|
|
||
| #include <cudf/column/column.hpp> | ||
| #include <cudf/lists/lists_column_view.hpp> | ||
|
|
||
| namespace cudf { | ||
| namespace lists { | ||
| /** | ||
| * @addtogroup lists_contains | ||
| * @{ | ||
| * @file | ||
| */ | ||
|
|
||
| /** | ||
| * @brief Create a column of bool values indicating whether the specified scalar | ||
| * is an element of each row of a list column. | ||
| * | ||
| * The output column has as many elements as the input `lists` column. | ||
| * Output `column[i]` is set to true if the lists row `lists[i]` contains the value | ||
| * specified in `search_key`. Otherwise, it is set to false. | ||
| * | ||
| * Output `column[i]` is set to null if one or more of the following are true: | ||
| * 1. The search key `search_key` is null | ||
| * 2. The list row `lists[i]` is null | ||
| * 3. The list row `lists[i]` does not contain the search key, and contains at least | ||
| * one null. | ||
| * | ||
| * @param lists Lists column whose `n` rows are to be searched | ||
| * @param search_key The scalar key to be looked up in each list row | ||
| * @param mr Device memory resource used to allocate the returned column's device memory. | ||
| * @return std::unique_ptr<column> BOOL8 column of `n` rows with the result of the lookup | ||
| */ | ||
| std::unique_ptr<column> contains( | ||
| cudf::lists_column_view const& lists, | ||
| cudf::scalar const& search_key, | ||
| rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); | ||
|
|
||
| /** | ||
| * @brief Create a column of bool values indicating whether the list rows of the first | ||
| * column contain the corresponding values in the second column | ||
| * | ||
| * The output column has as many elements as the input `lists` column. | ||
| * Output `column[i]` is set to true if the lists row `lists[i]` contains the value | ||
| * in `search_keys[i]`. Otherwise, it is set to false. | ||
| * | ||
| * Output `column[i]` is set to null if one or more of the following are true: | ||
| * 1. The row `search_keys[i]` is null | ||
| * 2. The list row `lists[i]` is null | ||
| * 3. The list row `lists[i]` does not contain the `search_keys[i]`, and contains at least | ||
| * one null. | ||
| * | ||
| * @param lists Lists column whose `n` rows are to be searched | ||
| * @param search_keys Column of elements to be looked up in each list row | ||
| * @param mr Device memory resource used to allocate the returned column's device memory. | ||
| * @return std::unique_ptr<column> BOOL8 column of `n` rows with the result of the lookup | ||
| */ | ||
| std::unique_ptr<column> contains( | ||
| cudf::lists_column_view const& lists, | ||
| cudf::column_view const& search_keys, | ||
| rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); | ||
|
|
||
| /** @} */ // end of group | ||
| } // namespace lists | ||
| } // namespace cudf | ||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.