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: Fix PartialEq for DataType::Unknown #15992

Merged
merged 1 commit into from
May 1, 2024
Merged

fix: Fix PartialEq for DataType::Unknown #15992

merged 1 commit into from
May 1, 2024

Conversation

ritchie46
Copy link
Member

No description provided.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels May 1, 2024
@@ -240,15 +240,7 @@ pub(super) fn process_binary(
right: node_right,
}));
},
(Unknown(lhs), Unknown(rhs)) if lhs == rhs => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't trust this.

@@ -472,14 +472,14 @@ def test_replace_fast_path_many_to_one() -> None:
def test_replace_fast_path_many_to_one_default() -> None:
lf = pl.LazyFrame({"a": [1, 2, 2, 3]})
result = lf.select(pl.col("a").replace([2, 3], 100, default=-1))
expected = pl.LazyFrame({"a": [-1, 100, 100, 100]}, schema={"a": pl.Int32})
expected = pl.LazyFrame({"a": [-1, 100, 100, 100]}, schema={"a": pl.Int64})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was wrong as the original dtype was i64.

@ritchie46 ritchie46 merged commit be09246 into main May 1, 2024
25 checks passed
@ritchie46 ritchie46 deleted the unknown branch May 1, 2024 08:21
@c-peters c-peters added the accepted Ready for implementation label May 6, 2024
Wouittone pushed a commit to Wouittone/polars that referenced this pull request Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants