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

Implement interleave_columns for list type #8046

Merged
merged 40 commits into from
May 3, 2021

Conversation

ttnghia
Copy link
Contributor

@ttnghia ttnghia commented Apr 23, 2021

This PR implements lists::interleave_columns that returns a single column by interleaving rows of the given table of list elements.

For example:

s1 = [{0, 1}, {2, 3, 4}, {5}, {}, {6, 7}]
s2 = [{8}, {9}, {}, {10, 11, 12}, {13, 14, 15, 16}]
r = lists::interleave_columns( table_view{s1, s2} )
r is now [{0, 1}, {8}, {2, 3, 4}, {9}, {5}, {}, {}, {10, 11, 12}, {6, 7}, {13, 14, 15, 16}]

Currently, only lists columns of one depth level are supported.

@ttnghia ttnghia added feature request New feature or request 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. labels Apr 23, 2021
@github-actions github-actions bot added the conda label Apr 28, 2021
@codecov
Copy link

codecov bot commented Apr 28, 2021

Codecov Report

Merging #8046 (68180b5) into branch-0.20 (51336df) will increase coverage by 0.02%.
The diff coverage is 88.67%.

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

@@               Coverage Diff               @@
##           branch-0.20    #8046      +/-   ##
===============================================
+ Coverage        82.88%   82.91%   +0.02%     
===============================================
  Files              103      103              
  Lines            17668    17865     +197     
===============================================
+ Hits             14645    14812     +167     
- Misses            3023     3053      +30     
Impacted Files Coverage Δ
python/cudf/cudf/core/column/__init__.py 100.00% <ø> (ø)
python/cudf/cudf/core/column/decimal.py 90.29% <ø> (-2.64%) ⬇️
python/cudf/cudf/core/column/interval.py 91.66% <ø> (+0.55%) ⬆️
python/cudf/cudf/core/column/lists.py 86.98% <ø> (-0.43%) ⬇️
python/cudf/cudf/core/column/numerical.py 94.72% <ø> (+0.29%) ⬆️
python/cudf/cudf/core/column/string.py 87.68% <ø> (+0.89%) ⬆️
python/cudf/cudf/core/column/struct.py 94.73% <ø> (-1.56%) ⬇️
python/cudf/cudf/core/column/timedelta.py 88.66% <ø> (ø)
python/cudf/cudf/core/dataframe.py 90.85% <ø> (+<0.01%) ⬆️
python/cudf/cudf/core/dtypes.py 94.95% <ø> (+1.14%) ⬆️
... and 45 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 7bf6de6...cca057c. Read the comment docs.

@ttnghia ttnghia requested a review from jrhemstad April 30, 2021 14:38
Copy link
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.

Some minor changes requested. Good job on the tests.

@ttnghia ttnghia requested a review from mythrocks April 30, 2021 23:21
@ttnghia ttnghia added CMake CMake build issue and removed CMake CMake build issue labels May 3, 2021
@ttnghia
Copy link
Contributor Author

ttnghia commented May 3, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 6ab91f2 into rapidsai:branch-0.20 May 3, 2021
@ttnghia ttnghia deleted the lists_columns_interleave branch May 3, 2021 21:52
rapids-bot bot pushed a commit that referenced this pull request May 6, 2021
This PR is trying to add java binding support for making List of List based on #8046. But the existing jni API makeList has already supported to create List of List, this PR just add unit tests for making list of list.

Authors:
  - Bobby Wang (https://github.com/wbo4958)

Approvers:
  - Jason Lowe (https://github.com/jlowe)

URL: #8111
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 CMake CMake build issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants