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] StructColumn __setitem__ and __getitem__ #8558

Closed
5 tasks done
shaneding opened this issue Jun 18, 2021 · 0 comments · Fixed by #8737
Closed
5 tasks done

[FEA] StructColumn __setitem__ and __getitem__ #8558

shaneding opened this issue Jun 18, 2021 · 0 comments · Fixed by #8737
Assignees
Labels
feature request New feature or request Python Affects Python cuDF API.

Comments

@shaneding
Copy link
Contributor

shaneding commented Jun 18, 2021

Issue for tracking the implementation of __setitem__ and __getitem__ on StructColumns.

  • cudf.Scalar({'a': 1, 'b': 2})
  • Add get_element_functor support for struct_view
  • Add scatter for struct_scalar
  • Implement __setitem__ (python side)
  • Implement __getitem__ (python side)
    cc @brandon-b-miller @isVoid
@shaneding shaneding added feature request New feature or request Needs Triage Need team to review and classify labels Jun 18, 2021
@shaneding shaneding self-assigned this Jun 18, 2021
@shaneding shaneding added Cython Python Affects Python cuDF API. and removed Needs Triage Need team to review and classify labels Jun 18, 2021
@shaneding shaneding changed the title [FEA] StructColumn __setitem__ [FEA] StructColumn __setitem__ and __getitem__ Jun 21, 2021
rapids-bot bot pushed a commit that referenced this issue Jun 25, 2021
Partly addresses #8558 

This PR supports retrieving a `struct_scalar` from `STRUCT` type column.

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

Approvers:
  - Robert Maynard (https://github.com/robertmaynard)
  - https://github.com/nvdbaranec

URL: #8578
rapids-bot bot pushed a commit that referenced this issue Jun 29, 2021
Implements necessary `__getitem__` changes for python side. Partly addresses #8558, merge after #8578

Authors:
  - https://github.com/shaneding

Approvers:
  - https://github.com/brandon-b-miller
  - Ashwin Srinath (https://github.com/shwina)

URL: #8577
rapids-bot bot pushed a commit that referenced this issue Jul 9, 2021
Allows the creation of a `struct_scalar` from python dictionary. Partly addresses #8558.

Authors:
  - https://github.com/shaneding

Approvers:
  - https://github.com/brandon-b-miller
  - Ram (Ramakrishna Prabhu) (https://github.com/rgsl888prabhu)

URL: #8629
rapids-bot bot pushed a commit that referenced this issue Jul 9, 2021
Partially addresses #8558

This PR adds support for scattering struct scalars.

Implementation notes:
Current implementation is based on copying the row data from each field as a new scalar and recursively calls scalar scattering on each field. There maybe an optimization on eliminating such copy. But will require extra scaffolding/scatter machinery.

Minor aspects of this PR:
- Refactors `column_scalar_scatterer` to include `scatter_scalar_bitmask_inplace` in each level of dispatch. This is required because scalar scattering can be nested.
- Adds `count_set_bit` and `count_unset_bit` detail APIs
- Adds default stream/mr for `detail::get_element`

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

Approvers:
  - Conor Hoekstra (https://github.com/codereport)
  - Mike Wilson (https://github.com/hyperbolic2346)
  - Gera Shegalov (https://github.com/gerashegalov)

URL: #8630
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 Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants