Skip to content
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

Fix exclusive scan when including nulls and improve testing #8478

Merged

Conversation

harrism
Copy link
Member

@harrism harrism commented Jun 10, 2021

Fixes #8462 by generalizing the existing mask_inclusive_scan used in inclusive_scan so it can be applied the same way in exclusive_scan. #8462 demonstrated holes in test coverage, so this PR also reorganizes scan_tests test infrastructure to enable a single set of tests to be applied to all supported data types and parameters, correctly expecting exceptions in unsupported cases (e.g. no product scans on fixed-point, only min/max inclusive scans on strings).

@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Jun 10, 2021
@codecov
Copy link

codecov bot commented Jun 10, 2021

Codecov Report

❗ No coverage uploaded for pull request base (branch-21.08@e448675). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 46031c2 differs from pull request most recent head 20d7177. Consider uploading reports for the commit 20d7177 to get more accurate results
Impacted file tree graph

@@               Coverage Diff               @@
##             branch-21.08    #8478   +/-   ##
===============================================
  Coverage                ?   83.00%           
===============================================
  Files                   ?      109           
  Lines                   ?    18215           
  Branches                ?        0           
===============================================
  Hits                    ?    15119           
  Misses                  ?     3096           
  Partials                ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e448675...20d7177. Read the comment docs.

@harrism harrism added bug Something isn't working non-breaking Non-breaking change tests Unit testing for project labels Jun 15, 2021
@harrism harrism self-assigned this Jun 16, 2021
@harrism harrism added the 3 - Ready for Review Ready for review by team label Jun 16, 2021
@harrism harrism marked this pull request as ready for review June 16, 2021 11:31
@harrism harrism requested a review from a team as a code owner June 16, 2021 11:31
Copy link
Contributor

@devavret devavret left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -85,15 +86,21 @@ typename std::enable_if<cudf::is_fixed_width<TypeParam>() &&
make_type_param_vector(std::initializer_list<T> const& init_list)
{
thrust::host_vector<TypeParam> vec(init_list.size());
std::transform(std::cbegin(init_list), std::cend(init_list), std::begin(vec), [](auto const& e) {
if (std::is_unsigned<TypeParam>::value)
std::transform(std::cbegin(init_list), std::cend(init_list), std::begin(vec), [](T const& e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is interesting. Why did we need the T to be explicit?

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't. Fixed, thanks. Also changed from if constexpr {return} else {return} to if constexpr {return} return to workaround known CUDA compiler issue (spurious warning I just noticed).

@harrism
Copy link
Member Author

harrism commented Jun 22, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit aa67b13 into rapidsai:branch-21.08 Jun 22, 2021
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 bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change tests Unit testing for project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] scan null_policy is either documented wrong or is producing incorrect results
3 participants