Dandandan commented on code in PR #6815:
URL: https://github.com/apache/arrow-datafusion/pull/6815#discussion_r1248712026
##########
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:
Instead of using `NOW()` we could use some table of dates instead to test
it?.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]