You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jayzhan211 (via GitHub)" <gi...@apache.org> on 2023/09/29 01:38:59 UTC
[GitHub] [arrow-datafusion] jayzhan211 commented on a diff in pull request #6815: Fix timestamp_add_interval_months to pass any date
jayzhan211 commented on code in PR #6815:
URL: https://github.com/apache/arrow-datafusion/pull/6815#discussion_r1340799239
##########
datafusion/core/tests/sql/timestamp.rs:
##########
@@ -579,8 +579,8 @@ async fn timestamp_add_interval_months() -> Result<()> {
let t1_naive = chrono::NaiveDateTime::parse_from_str(res1, format).unwrap();
let t2_naive = chrono::NaiveDateTime::parse_from_str(res2, format).unwrap();
- let year = t1_naive.year() + (t1_naive.month() as i32 + 17) / 12;
- let month = (t1_naive.month() + 17) % 12;
+ let year = t1_naive.year() + (t1_naive.month0() as i32 + 17) / 12;
Review Comment:
@Dandandan It seems your suggestion is great, it failed today again :(
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org