Skip to content

Conversation

@jayzhan211
Copy link
Contributor

Which issue does this PR close?

Closes #6814.

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

Signed-off-by: jayzhan211 <[email protected]>
@github-actions github-actions bot added the core Core DataFusion crate label Jul 1, 2023
Signed-off-by: jayzhan211 <[email protected]>

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using NOW() we could use some table of dates instead to test it?.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would avoid the test breaking suddenly on a certain date.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dandandan It seems your suggestion is great, it failed today again :(

Copy link
Contributor

@Dandandan Dandandan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve to get the main branch passing. Left a comment to improve the test

@Dandandan Dandandan merged commit d526a2e into apache:main Jul 1, 2023
2010YOUY01 pushed a commit to 2010YOUY01/arrow-datafusion that referenced this pull request Jul 5, 2023
* fix

Signed-off-by: jayzhan211 <[email protected]>

* use month0

Signed-off-by: jayzhan211 <[email protected]>

---------

Signed-off-by: jayzhan211 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix timestamp_add_interval_months to pass on any date

2 participants