-
Notifications
You must be signed in to change notification settings - Fork 902
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 edge case in tdigest scalar generation for groups containing all nulls. #9551
Fix edge case in tdigest scalar generation for groups containing all nulls. #9551
Conversation
…of nulls, which was causing the tdigest reduce_by_key step to run out of bounds.
Codecov Report
@@ Coverage Diff @@
## branch-21.12 #9551 +/- ##
================================================
- Coverage 10.79% 10.64% -0.15%
================================================
Files 116 117 +1
Lines 18869 19339 +470
================================================
+ Hits 2036 2059 +23
- Misses 16833 17280 +447
Continue to review full report at Codecov.
|
@gpucibot merge |
thrust::make_counting_iterator(0), | ||
_weights->mutable_view().begin<double>(), | ||
is_stub_weight); | ||
auto _means = remove_stubs(*means, num_stubs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
For the scalar input case, groups containing all nulls would generate empty digests (those with no clusters). However during the final
reduce_by_key
call those values were still getting visited and were therefore expecting a place to store the unused reduced values, which would cause a subsequent overrun later on.The fix is to specifically leave a single "stub" centroid entry for this specific case and then strip them out in a postprocess.