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

[BUG] Incorrect slice on struct column. #8718

Closed
shaneding opened this issue Jul 12, 2021 · 0 comments · Fixed by #8719
Closed

[BUG] Incorrect slice on struct column. #8718

shaneding opened this issue Jul 12, 2021 · 0 comments · Fixed by #8719
Assignees
Labels
bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API.

Comments

@shaneding
Copy link
Contributor

Describe the bug
This bug is two fold. Firstly, cpp_copying.slice() generates an incorrect slice of the underlying struct column. Furthermore, the fields of the column after slicing is also incorrect (needs to be correctly repopulated).

Steps/Code to reproduce bug

In [15]: import cudf
In [16]: sr = cudf.Series([{"a": "Hello world"}, {"a": "String 2"}, {"a": "String 3"}])
In [17]: sr[1:]
Out[17]: 
1    {'0': 'Hello world'}
2       {'0': 'String 2'}
dtype: struct
In [18]: 

Expected behavior

1       {'a': 'String 2'}
2       {'a': 'String 3'}
dtype: struct
@shaneding shaneding added bug Something isn't working Needs Triage Need team to review and classify labels Jul 12, 2021
@shaneding shaneding added libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. labels Jul 12, 2021
@shaneding shaneding self-assigned this Jul 12, 2021
@harrism harrism removed the Needs Triage Need team to review and classify label Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants