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: Allow step parameter in int_ranges to take an expression #13148

Merged
merged 3 commits into from Dec 22, 2023

Conversation

reswqa
Copy link
Collaborator

@reswqa reswqa commented Dec 20, 2023

Theoretically we can expressify step/interval for both numeric and temporal ranges, but only the former is supported here. Things are more complicated for temporal ranges:

  1. For the interval parameter, we do not want it to participate in the casting of common super type with start & end. We could add new special branch to the type conversion rule, but I'd like to see a more general solution, especially as we increasingly turn arguments into expressions.
  2. For datetime_ranges, the type conversion of start/end depends in part on the value of interval.

So I think of it as follow-up PR(At that time, maybe we can unify temporal_ranges_impl_broadcast and numeric_ranges_impl_broadcast, or maybe we can't. Sometimes it's hard to unify the handling of numeric and utf8 types without using macros, but I don't like it).

@reswqa reswqa changed the title feat(rust): Allow step parameter in int_ranges to take an expression feat(rust): Allow step parameter in int_ranges to take an expression Dec 20, 2023
@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature rust Related to Rust Polars labels Dec 20, 2023
@reswqa
Copy link
Collaborator Author

reswqa commented Dec 20, 2023

It seems that test_gevent_collect_async_switch is a bit unstable today.

For further investigation:
https://github.com/pola-rs/polars/actions/runs/7273302201/job/19817013295?pr=13148#step:11:178

@reswqa reswqa marked this pull request as ready for review December 20, 2023 09:58
@stinodego stinodego changed the title feat(rust): Allow step parameter in int_ranges to take an expression feat: Allow step parameter in int_ranges to take an expression Dec 20, 2023
@github-actions github-actions bot added the python Related to Python Polars label Dec 20, 2023
@ritchie46 ritchie46 merged commit 4cb43cd into pola-rs:main Dec 22, 2023
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

None yet

2 participants