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

chore(rust!): move offset_by implementation from polars-plan to polars-time, rename feature from DateOffset to OffsetBy #16796

Merged
merged 1 commit into from
Jun 9, 2024

Conversation

MarcoGorelli
Copy link
Collaborator

@MarcoGorelli MarcoGorelli commented Jun 6, 2024

addressing a comment from a previous pr #16728 (comment)

I've also:

  • renamed FunctionExpr::DateOffset to FunctionExpr::TemporalExpr(TemporalFunction::OffsetBy
  • renamed the feature date_offset to offset_by

I've noticed that whereas in polars-ops, every feature seems to be under its own feature flag, in polars-time that doesn't seem to be the case. I've put offset_by, month_start, and month_end under their own feature flags - is this ok?

Functional changes: none

@github-actions github-actions bot added breaking rust Change that breaks backwards compatibility for the Rust crate internal An internal refactor or improvement rust Related to Rust Polars labels Jun 6, 2024
Copy link

codspeed-hq bot commented Jun 6, 2024

CodSpeed Performance Report

Merging #16796 will not alter performance

Comparing MarcoGorelli:move-offset-by (be8bd6b) with main (fa12a8e)

Summary

✅ 37 untouched benchmarks

@MarcoGorelli MarcoGorelli force-pushed the move-offset-by branch 3 times, most recently from 149e7e0 to 664a4f8 Compare June 8, 2024 10:20
Copy link

codecov bot commented Jun 8, 2024

Codecov Report

Attention: Patch coverage is 93.54839% with 6 lines in your changes missing coverage. Please review.

Project coverage is 81.37%. Comparing base (38149d6) to head (be8bd6b).
Report is 1 commits behind head on main.

Files Patch % Lines
crates/polars-time/src/offset_by.rs 95.06% 4 Missing ⚠️
...ates/polars-plan/src/dsl/function_expr/datetime.rs 80.00% 1 Missing ⚠️
py-polars/src/lazyframe/visitor/expr_nodes.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16796      +/-   ##
==========================================
- Coverage   81.39%   81.37%   -0.02%     
==========================================
  Files        1424     1425       +1     
  Lines      187623   187599      -24     
  Branches     2691     2691              
==========================================
- Hits       152719   152667      -52     
- Misses      34409    34437      +28     
  Partials      495      495              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…s-time, rename feature from DateOffset to OffsetBy
@MarcoGorelli MarcoGorelli marked this pull request as ready for review June 8, 2024 13:40
@ritchie46
Copy link
Member

offset_by, month_start, and month_end under their own feature flags - is this ok?

Yes, that's ok. That saves compile times/bloat for rust users, who don't need that.

@ritchie46 ritchie46 merged commit 4bf35d8 into pola-rs:main Jun 9, 2024
29 checks passed
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 internal An internal refactor or improvement rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants