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, rust): Only consider dt series equal if they have the same tz #5025

Merged
merged 1 commit into from
Sep 29, 2022

Conversation

matteosantama
Copy link
Contributor

@matteosantama matteosantama commented Sep 29, 2022

Closes #5023

I briefly debated allowing two series to be considered equal if they had different timezones provided they represented the same UTC time. But I think this is more likely to lead to unexpected behavior. It is more explicit, and clearer, to require users to explicitly convert their datetimes to a canonical timezone before checking for equality.

@github-actions github-actions bot added the rust Related to Rust Polars label Sep 29, 2022
@matteosantama matteosantama force-pushed the series-equal-tz branch 4 times, most recently from 5805e8a to 3a1c112 Compare September 29, 2022 14:01
@github-actions github-actions bot added the python Related to Python Polars label Sep 29, 2022
@ritchie46
Copy link
Member

Make sense. Thanks!

@ritchie46 ritchie46 merged commit fb716e1 into pola-rs:master Sep 29, 2022
@matteosantama matteosantama deleted the series-equal-tz branch September 29, 2022 18:23
@stinodego stinodego changed the title fix[rust]: only consider dt series equal if they have the same tz fix(python, rust): only consider dt series equal if they have the same tz Oct 1, 2022
@github-actions github-actions bot added the fix Bug fix label Oct 1, 2022
@stinodego stinodego changed the title fix(python, rust): only consider dt series equal if they have the same tz fix(python, rust): Only consider dt series equal if they have the same tz Oct 1, 2022
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 rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Equality of Series with/without timezones
2 participants