Skip to content

Support nested types in lists::contains#10548

Merged
rapids-bot[bot] merged 206 commits intorapidsai:branch-22.10from
ttnghia:lists_contains_for_structs
Aug 22, 2022
Merged

Support nested types in lists::contains#10548
rapids-bot[bot] merged 206 commits intorapidsai:branch-22.10from
ttnghia:lists_contains_for_structs

Conversation

@ttnghia
Copy link
Copy Markdown
Contributor

@ttnghia ttnghia commented Mar 30, 2022

This extends the lists::contains API to support nested types (lists + structs) with arbitrarily nested levels. As such, lists::contains will work with literally any type of input data.

In addition, the related implementation has been significantly refactored to facilitate adding new implementation.

Closes #8958.
Depends on:

@ttnghia ttnghia added feature request New feature or request 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. Spark Functionality that helps Spark RAPIDS non-breaking Non-breaking change labels Mar 30, 2022
@ttnghia ttnghia self-assigned this Mar 30, 2022
ttnghia added 4 commits August 4, 2022 14:16
Signed-off-by: Nghia Truong <nghiatruong.vn@gmail.com>

# Conflicts:
#	cpp/src/lists/contains.cu
Signed-off-by: Nghia Truong <nghiatruong.vn@gmail.com>
Copy link
Copy Markdown
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments attached.

Signed-off-by: Nghia Truong <nghiatruong.vn@gmail.com>
@ttnghia ttnghia requested review from bdice and mythrocks August 16, 2022 18:56
Copy link
Copy Markdown
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more comments -- I think I will approve when these are addressed. There's a lot going on in this PR and I've tried my best to make sense of it, but there's a lot of "patterning" with complex lambdas, boolean template dispatches, etc. I am struggling to find better recommendations but I don't think I can concretely identify what I would prefer in those cases, if anything, at this time.

Signed-off-by: Nghia Truong <nghiatruong.vn@gmail.com>
Signed-off-by: Nghia Truong <nghiatruong.vn@gmail.com>
Signed-off-by: Nghia Truong <nghiatruong.vn@gmail.com>
Copy link
Copy Markdown
Contributor

@mythrocks mythrocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ttnghia ttnghia requested a review from bdice August 18, 2022 05:31
Copy link
Copy Markdown
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment, otherwise LGTM.

auto const lists = [] {
auto offsets = indices_col{0, 4, 7, 10, 15, 18, 21, 24, 24, 28, 28};
// clang-format off
auto data1 = tdata_col{0, 1, 2, 1, //
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the trailing // necessary if clang-format is already turned off in this section? I'd remove the trailing //.

Signed-off-by: Nghia Truong <nghiatruong.vn@gmail.com>
@ttnghia
Copy link
Copy Markdown
Contributor Author

ttnghia commented Aug 22, 2022

Rerun tests.

@ttnghia
Copy link
Copy Markdown
Contributor Author

ttnghia commented Aug 22, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 8f3cc74 into rapidsai:branch-22.10 Aug 22, 2022
@ttnghia ttnghia deleted the lists_contains_for_structs branch August 23, 2022 04:33
rapids-bot bot pushed a commit that referenced this pull request Aug 25, 2022
On some systems, CUDA compiler may have an issue such that it will throw unused variables warnings into your face if you use `if constexpr` with an `else` branch. Such warnings were reported due to a recent merged PR (#10548).

This PR rewrites the `else` branch of the `if constexpr` in `lists/contains.cu` into a second `if constexpr` statement with opposite condition to avoid the warnings.

Authors:
  - Nghia Truong (https://github.com/ttnghia)

Approvers:
  - David Wendt (https://github.com/davidwendt)
  - Bradley Dice (https://github.com/bdice)
  - Mark Harris (https://github.com/harrism)

URL: #11581
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review Ready for review by team feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Spark Functionality that helps Spark RAPIDS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] support lists::contains on lists of structs.

5 participants