-
Notifications
You must be signed in to change notification settings - Fork 915
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 lists::concatenate_list_elements
#8231
Implement lists::concatenate_list_elements
#8231
Conversation
Reference: #8006 |
Codecov Report
@@ Coverage Diff @@
## branch-21.06 #8231 +/- ##
===============================================
Coverage ? 82.84%
===============================================
Files ? 105
Lines ? 17865
Branches ? 0
===============================================
Hits ? 14800
Misses ? 3065
Partials ? 0 Continue to review full report at Codecov.
|
bac62a1
to
afce24e
Compare
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.
Approving CMake changes.
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.
Java approval
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.
Approving ops-codeowner
file changes
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.
This code is giving me major déjà vu. Can you try to consolidate this with lists::concatinate_rows
? There seems to be lot of shared logic. Even better, it looks like the entirety of lists::concatinate_rows
can be reimplemented as an interleave_columns
followed by a concatenate_list_elements
.
…s` and `lists::concatenate_list_elements`
@@ -5,7 +5,7 @@ from libcpp.memory cimport unique_ptr | |||
from cudf._lib.cpp.column.column cimport column | |||
from cudf._lib.cpp.table.table_view cimport table_view | |||
|
|||
cdef extern from "cudf/lists/concatenate_rows.hpp" namespace \ | |||
cdef extern from "cudf/lists/combine.hpp" namespace \ |
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.
This file would likely have to be renamed too to combine.pxd
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.
Thanks. Done.
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.
This much better
Rerun tests. |
@gpucibot merge |
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:
This closes #8164. In addition,
lists::concatenate_rows
is rewritten usinglists::interleave_columns
following bylists::concatenate_list_elements
, which is significantly shorter.