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 segmented_reduce on empty column with non-empty offsets #10876

Merged

Conversation

davidwendt
Copy link
Contributor

Fixes cudf::segmented_reduce where the input values column is empty but the offsets are not. In this case, the offsets vector {0,0} specifies an empty segment which should result in a single null row. The logic has been fixed and new gtest cases have been added.

Closes #10556

@davidwendt davidwendt added bug Something isn't working 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels May 17, 2022
@davidwendt davidwendt self-assigned this May 17, 2022
@codecov
Copy link

codecov bot commented May 17, 2022

Codecov Report

Merging #10876 (6783b90) into branch-22.06 (6352b4e) will increase coverage by 0.03%.
The diff coverage is 100.00%.

❗ Current head 6783b90 differs from pull request most recent head 889e4ee. Consider uploading reports for the commit 889e4ee to get more accurate results

@@               Coverage Diff                @@
##           branch-22.06   #10876      +/-   ##
================================================
+ Coverage         86.29%   86.33%   +0.03%     
================================================
  Files               144      144              
  Lines             22656    22665       +9     
================================================
+ Hits              19552    19567      +15     
+ Misses             3104     3098       -6     
Impacted Files Coverage Δ
python/cudf/cudf/core/_base_index.py 85.71% <ø> (ø)
python/cudf/cudf/core/frame.py 93.41% <ø> (ø)
python/cudf/cudf/core/groupby/groupby.py 91.79% <ø> (+0.22%) ⬆️
python/cudf/cudf/core/index.py 92.06% <ø> (ø)
python/cudf/cudf/core/indexed_frame.py 91.70% <ø> (ø)
python/cudf/cudf/core/series.py 95.17% <ø> (ø)
python/cudf/cudf/core/column/string.py 88.78% <100.00%> (+0.12%) ⬆️
python/dask_cudf/dask_cudf/groupby.py 97.42% <100.00%> (+<0.01%) ⬆️
python/dask_cudf/dask_cudf/tests/test_groupby.py 100.00% <100.00%> (ø)
python/cudf/cudf/core/dataframe.py 93.78% <0.00%> (+0.04%) ⬆️
... and 4 more

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 7f9d51b...889e4ee. Read the comment docs.

@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels May 17, 2022
@davidwendt davidwendt marked this pull request as ready for review May 17, 2022 19:25
@davidwendt davidwendt requested a review from a team as a code owner May 17, 2022 19:25
Copy link
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.

Great! I suppose we tried to be too "clever" with the early exit here and it bit us.

Copy link
Member

@jlowe jlowe left a comment

Choose a reason for hiding this comment

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

Tested this with the original Spark query that triggered a failure and it now produces the correct results with this change. Thanks, @davidwendt!

@davidwendt
Copy link
Contributor Author

@gpucibot merge

@rapids-bot rapids-bot bot merged commit ac77940 into rapidsai:branch-22.06 May 18, 2022
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] listReduce on a single row input with an empty list generates a zero row output
5 participants