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] Let cudf::make_column_from_scalar support list type #8088

Closed
firestarman opened this issue Apr 28, 2021 · 2 comments · Fixed by #8185
Closed

[FEA] Let cudf::make_column_from_scalar support list type #8088

firestarman opened this issue Apr 28, 2021 · 2 comments · Fixed by #8185
Labels
feature request New feature or request libcudf Affects libcudf (C++/CUDA) code.

Comments

@firestarman
Copy link
Contributor

Since the PR #7584 has inroduced the list scalar, we want to create a column from a scalar of list type.

@firestarman firestarman added feature request New feature or request Needs Triage Need team to review and classify labels Apr 28, 2021
@firestarman firestarman changed the title [FEA] Let cudf::make_column_from_scalar support list type [FEA] Let cudf::make_column_from_scalar support list type Apr 28, 2021
@harrism harrism added libcudf Affects libcudf (C++/CUDA) code. and removed Needs Triage Need team to review and classify labels Apr 28, 2021
@sperlingxx
Copy link
Contributor

sperlingxx commented Apr 30, 2021

Do we need to support making column from scalar composed of nested list?

@firestarman
Copy link
Contributor Author

I think yes

rapids-bot bot pushed a commit that referenced this issue May 20, 2021
This PR adds support to `make_column_from_scalar` for `list_scalar`. For 0-length columns, a well-formed `LIST` type column, whose child column has the same column hierarchy to the row data stored in `list_scalar` is returned.

Example:
```
slr.data = [1, 2, 3] // An integer list of 1, 2, 3, `data` is an INT column
make_column_from_scalar(s, 2) // List<int> column: {[1, 2, 3], [1, 2, 3]}, whose child column is an `INT` column.

slr.data = [[1, 2], [3]] // A list of integer lists, `data` is a List<int> column
make_column_from_scalar(s, 0) // Well formed, 0-length List<List<int>> column, whose child column is a List<int> column.
```

Closes #8088

Authors:
  - Michael Wang (https://github.com/isVoid)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)
  - Devavret Makkar (https://github.com/devavret)
  - Mark Harris (https://github.com/harrism)

URL: #8185
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