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

fix(python): ensure explicit "return_dtype" is respected by map_dicts #12436

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Nov 14, 2023

Closes #12410, partially addresses #11332.

  • Significantly streamlined map_dicts implementation to avoid a lot of copy/paste and make it a little easier to reason about.

  • Fixed issue where an explicitly-provided "result_dtype" value was not being passed through to the underlying map_batches expression, and added some coverage.

Note: only partially addresses #11332 as we should probably be able to do better with inference in the absence of an explicit "result_dtype", such that the fill_null succeeds (it currently fails as the expression dtype is considered "Unknown" and it is looking for numeric columns to fill, ref: #7700).

@github-actions github-actions bot added fix Bug fix python Related to Python Polars labels Nov 14, 2023
@ritchie46 ritchie46 merged commit 20ee370 into pola-rs:main Nov 14, 2023
26 checks passed
@alexander-beedie alexander-beedie deleted the mapdicts-return-dtype branch November 14, 2023 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.map_dict ignores return_dtype=
2 participants