Skip to content

Fixing empty null lists throwing explode_outer for a loop. - #7649

Merged
rapids-bot[bot] merged 6 commits into
NVIDIA:branch-0.19from
hyperbolic2346:mwilson/explode_outer_fix_empty
Mar 24, 2021
Merged

Fixing empty null lists throwing explode_outer for a loop. #7649
rapids-bot[bot] merged 6 commits into
NVIDIA:branch-0.19from
hyperbolic2346:mwilson/explode_outer_fix_empty

Conversation

@hyperbolic2346

Copy link
Copy Markdown
Contributor

I found two issues, one was that we didn't build the correct number of null or empty offsets. We should build them for the exploded column and they are sized as such, but I was marching over it the size of the child data column. This didn't cause trouble as long as there was more data than nulls.

The second issue was the large loop. We have to go over that loop at least the number of nulls we have as that loop is doing two things at once.

  1. writing the valid data rows to a gather map.
  2. filling in the holes in the gather map for null and empty entries.

This was another case of things working fine as long as we ran the loop enough to cover all the null entries, which happens unless there are more nulls than entries. That wasn't tested and so it was never seen. Thankfully, @sperlingxx tested exactly that.

Added a test for this case.

Fixes #7636

@hyperbolic2346
hyperbolic2346 requested a review from a team as a code owner March 19, 2021 04:12
@github-actions github-actions Bot added the libcudf Affects libcudf (C++/CUDA) code. label Mar 19, 2021
@hyperbolic2346 hyperbolic2346 added 3 - Ready for Review Ready for review by team bug Something isn't working non-breaking Non-breaking change and removed libcudf Affects libcudf (C++/CUDA) code. labels Mar 19, 2021
@github-actions github-actions Bot added the libcudf Affects libcudf (C++/CUDA) code. label Mar 19, 2021
@codecov

codecov Bot commented Mar 19, 2021

Copy link
Copy Markdown

Codecov Report

Merging #7649 (243f167) into branch-0.19 (7871e7a) will increase coverage by 0.61%.
The diff coverage is n/a.

❗ Current head 243f167 differs from pull request most recent head 7255789. Consider uploading reports for the commit 7255789 to get more accurate results
Impacted file tree graph

@@               Coverage Diff               @@
##           branch-0.19    #7649      +/-   ##
===============================================
+ Coverage        81.86%   82.48%   +0.61%     
===============================================
  Files              101      101              
  Lines            16884    17426     +542     
===============================================
+ Hits             13822    14373     +551     
+ Misses            3062     3053       -9     
Impacted Files Coverage Δ
python/cudf/cudf/core/column/categorical.py 91.97% <ø> (+0.58%) ⬆️
python/cudf/cudf/core/column/column.py 87.86% <ø> (+0.10%) ⬆️
python/cudf/cudf/core/column/datetime.py 89.63% <ø> (+0.54%) ⬆️
python/cudf/cudf/core/column/decimal.py 92.75% <ø> (-2.12%) ⬇️
python/cudf/cudf/core/column/lists.py 90.00% <ø> (-1.40%) ⬇️
python/cudf/cudf/core/column/numerical.py 94.83% <ø> (-0.20%) ⬇️
python/cudf/cudf/core/column/string.py 86.79% <ø> (+0.30%) ⬆️
python/cudf/cudf/core/column/timedelta.py 88.57% <ø> (+0.33%) ⬆️
python/cudf/cudf/core/column_accessor.py 96.01% <ø> (+0.70%) ⬆️
python/cudf/cudf/core/dataframe.py 90.90% <ø> (+0.43%) ⬆️
... and 60 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 8687182...7255789. Read the comment docs.

Comment thread cpp/src/lists/explode.cu Outdated
Comment thread cpp/src/lists/explode.cu Outdated
Comment thread cpp/tests/lists/explode_tests.cpp Outdated
Comment thread cpp/tests/lists/explode_tests.cpp Outdated
Comment thread cpp/src/lists/explode.cu
Comment thread cpp/src/lists/explode.cu
Comment thread cpp/src/lists/explode.cu
Comment thread cpp/src/lists/explode.cu

@mythrocks mythrocks left a comment

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.

Apologies for the delayed review. It took me some time to grok the logic in the combined loop.

LGTM, at last!

@hyperbolic2346

Copy link
Copy Markdown
Contributor Author

@gpucibot merge

@rapids-bot
rapids-bot Bot merged commit 8a7af11 into NVIDIA:branch-0.19 Mar 24, 2021
@hyperbolic2346
hyperbolic2346 deleted the mwilson/explode_outer_fix_empty branch March 24, 2021 17:01
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] Exception of explode_outer on entire invalid column

4 participants