Skip to content

Commit

Permalink
use wrapping_add_scalar
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Jun 5, 2024
1 parent f6d31f8 commit 42777b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/polars-plan/src/dsl/function_expr/temporal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ fn apply_offsets_to_datetime(
if offset.negative() {
duration = -duration;
}
Ok(datetime.0.apply_values(|v| v + duration))
Ok(datetime.0.clone().wrapping_add_scalar(duration))
} else {
let offset_fn = match datetime.time_unit() {
TimeUnit::Milliseconds => Duration::add_ms,
Expand Down

0 comments on commit 42777b5

Please sign in to comment.