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

[rust-0.44] No way to mutate MutableStructArray #19585

Closed
2 tasks done
utkarshgupta137 opened this issue Nov 1, 2024 · 1 comment · Fixed by #19587
Closed
2 tasks done

[rust-0.44] No way to mutate MutableStructArray #19585

utkarshgupta137 opened this issue Nov 1, 2024 · 1 comment · Fixed by #19587
Assignees
Labels
accepted Ready for implementation bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars

Comments

@utkarshgupta137
Copy link
Contributor

utkarshgupta137 commented Nov 1, 2024

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Issue description

In #19123, the mut_values() method was removed from MutableStructArray. As far as I can tell, there is no way to add elements to MutableStructArray anymore. I've gone through all the APIs available in the docs & also gone through the code base. The only workaround seems to be to copy the MutableStructArray code & re-add mut_values.
All other similar MutableXYZArray still provide one way or another (either mut_values() or push()) to mutate the data. Also, there are two places in the code base where a similar struct is used & both of them still provide mut_values() method.

Expected behavior

My personal preference would be to re-add the mut_values() method. If that is something the devs want to do away with, we at least need push() & preferably extend().

Installed versions

polars = { version = "0.44", default-features = false, features = ["bigidx", "dtype-datetime", "dtype-date", "dtype-time", "dtype-duration", "dtype-u8", "dtype-u16", "dtype-i8", "dtype-i16", "performant", "ipc", "polars-io"] }
polars-core = { version = "0.44", default-features = false }
@utkarshgupta137 utkarshgupta137 added bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars labels Nov 1, 2024
@ritchie46
Copy link
Member

I think we are working towards removing it. We don't use it, so it will be removed.

@c-peters c-peters added the accepted Ready for implementation label Nov 4, 2024
@github-project-automation github-project-automation bot moved this to Ready in Backlog Nov 4, 2024
@c-peters c-peters moved this from Ready to Done in Backlog Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants