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

refactor!: remove <Series>$compare() #1272

Merged
merged 2 commits into from
Nov 2, 2024
Merged

refactor!: remove <Series>$compare() #1272

merged 2 commits into from
Nov 2, 2024

Conversation

eitsupi
Copy link
Collaborator

@eitsupi eitsupi commented Nov 2, 2024

Needed for #1271

This does not exist in Python Polars and can no longer be maintained since the Rust functions used internally have been removed.

unwrap(paste0("in $compare() with operator `", op, "`:"))
#' @export
`==.RPolarsSeries` = function(s1, s2) {
pl$select(pl$lit(s1)$eq(pl$lit(as_polars_series(s2))$cast(s1$dtype)))$to_series()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It should be noted that although cast is added to pass existing tests (presumably tested to mimic the behavior of Python Polars), this leads to some rather strange behavior. (pola-rs/polars#19603)

@eitsupi eitsupi merged commit e4ea2c5 into main Nov 2, 2024
@eitsupi eitsupi deleted the remove-series-compare branch November 2, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant