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 creating lists of structs #8927

Closed
andygrove opened this issue Aug 2, 2021 · 0 comments · Fixed by #9012
Closed

[FEA] Support creating lists of structs #8927

andygrove opened this issue Aug 2, 2021 · 0 comments · Fixed by #9012
Assignees
Labels
feature request New feature or request libcudf Affects libcudf (C++/CUDA) code.

Comments

@andygrove
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I am trying to implement a GPU version of Spark's CreateMap expression (NVIDIA/spark-rapids#3014) but cuDF doesn't currently support creating a list of structs. The cuDF interleave_columns_functor looks for fixed-width, string_view, or list_view but the list view requires non-nested children, so I get an unsupported type error.

Describe the solution you'd like
Here is the rough code that I would like to write in the Spark plugin:

val struct = ColumnVector.makeStruct(keyColumn, valueColumn)
val list = ColumnVector.makeList(numRows, DType.STRUCT, struct)
GpuColumnVector.from(list, dataType)

Describe alternatives you've considered
None

Additional context
None

@andygrove andygrove added feature request New feature or request Needs Triage Need team to review and classify labels Aug 2, 2021
@beckernick beckernick added libcudf Affects libcudf (C++/CUDA) code. and removed Needs Triage Need team to review and classify labels Aug 3, 2021
@ttnghia ttnghia self-assigned this Aug 4, 2021
rapids-bot bot pushed a commit that referenced this issue Aug 17, 2021
This PR adds support for structs column in the `interleave_column` API. In addition, it also does a simple refactor of the existing overload functions with a new style of SFINAE implementation.
Closes #8927.

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

Approvers:
  - David Wendt (https://github.com/davidwendt)
  - Ram (Ramakrishna Prabhu) (https://github.com/rgsl888prabhu)

URL: #9012
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants