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

feat(rust!,python): Extend datetime expression function with time zone/time unit parameters #10235

Merged
merged 7 commits into from
Aug 3, 2023

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Aug 1, 2023

Closes #7416

Changes:

  • Add time_unit, time_zone and use_earliest arguments to the datetime expression function
  • On the Rust side, move everything into the standard expression architecture.

Paging @MarcoGorelli for a review 😄

@github-actions github-actions bot added breaking rust Change that breaks backwards compatibility for the Rust crate enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Aug 1, 2023
@ritchie46
Copy link
Member

Wow! TIL about rust! 🤯

@stinodego
Copy link
Member Author

Wow! TIL about rust! 🤯

I added this because a lot of our changes break Rust but not Python. Recently, Rust Polars 0.31.1 was released, which should really have been 0.32.0 as it has plenty of changes that could be considered breaking.

So yes, you can add ! to a scope now :) that should make the Rust changelogs more useful.

@ritchie46
Copy link
Member

Recently, Rust Polars 0.31.1 was released, which should really have been 0.32.0 as it has plenty of changes that could be considered breaking.

No, the breaking release was already going from 0.30 to 0.31 :) The 0.31.1 release was only an attempt to build the docs.

But, I do agree that we must have the breaking changes in the changelog.

@stinodego stinodego marked this pull request as draft August 2, 2023 11:24
@stinodego stinodego changed the title feat(rust!,python): Add time_zone and time_unit args to datetime expression function feat(rust!,python): Extend datetime expression function with time zone/time unit parameters Aug 2, 2023
@stinodego stinodego marked this pull request as ready for review August 2, 2023 13:14
Copy link
Collaborator

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Nice, no objections!

@stinodego stinodego merged commit 873d18e into main Aug 3, 2023
24 checks passed
@stinodego stinodego deleted the datetime-tu-tz branch August 3, 2023 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking rust Change that breaks backwards compatibility for the Rust crate enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Have timezone in pl.datetime constructor
3 participants