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

[FEA] Support concatenate_list_elements for list type #8164

Closed
ttnghia opened this issue May 5, 2021 · 1 comment · Fixed by #8231
Closed

[FEA] Support concatenate_list_elements for list type #8164

ttnghia opened this issue May 5, 2021 · 1 comment · Fixed by #8231
Assignees
Labels
feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change

Comments

@ttnghia
Copy link
Contributor

ttnghia commented May 5, 2021

Currently, we have strings::concatenate_list_elements to concatenate strings within each list (row) in a lists column. We also need the same functionality for list type (in particular, column of lists of lists). For example:

l = [ [{1, 2}, {3, 4}, {5}], [{6}, {}, {7, 8, 9}] ]
r = lists::concatenate_list_elements(l);
r is [ {1, 2, 3, 4, 5}, {6, 7, 8, 9} ] 
@ttnghia ttnghia added feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels May 5, 2021
@ttnghia ttnghia self-assigned this May 5, 2021
@ttnghia ttnghia changed the title [FEA] Support concatenate_lists_elements for list type [FEA] Support concatenate_list_elements for list type May 5, 2021
@ttnghia
Copy link
Contributor Author

ttnghia commented May 5, 2021

Reference: #8006

rapids-bot bot pushed a commit that referenced this issue May 20, 2021
This PR implements `lists::concatenate_list_elements` for list type. Given a lists column in which each row is a list of lists, the output column is generated by concatenating all lists in the same row into a single list.

Example:
```
l = [ [{1, 2}, {3, 4}, {5}], [{6}, {}, {7, 8, 9}] ]
r = lists::concatenate_list_elements(l);
r is [ {1, 2, 3, 4, 5}, {6, 7, 8, 9} ]
```

This closes #8164. In addition, `lists::concatenate_rows` is rewritten using `lists::interleave_columns` following by `lists::concatenate_list_elements`, which is significantly shorter.

Authors:
  - Nghia Truong (https://github.com/ttnghia)

Approvers:
  - Robert Maynard (https://github.com/robertmaynard)
  - Jason Lowe (https://github.com/jlowe)
  - AJ Schmidt (https://github.com/ajschmidt8)
  - GALI PREM SAGAR (https://github.com/galipremsagar)
  - Devavret Makkar (https://github.com/devavret)

URL: #8231
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant