Skip to content

Conversation

DifferentialOrange
Copy link
Member

@DifferentialOrange DifferentialOrange commented Jul 17, 2023

Fix various issues related to datetime interval type. See commits for more info.

Thanks to @ArtDu for reporting these issues.

Add Interval with week encoding test cases and datetime arithmetic week
test case.
Before this patch, weeks were ignored in Interval addition
and subtraction. This patch fixes the issue.
Copy link
Contributor

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

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

Thank you for the patch!

@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/fix-intervals branch from 9ee4f2a to 95e1fcb Compare July 18, 2023 07:21
Before this patch, any value was allowed for interval attributes. Now
we use the same rules as in Tarantool. A couple of issues were met while
developing this patch, follow [1, 2] for core updates.

1. tarantool/tarantool#8878
2. tarantool/tarantool#8887
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/fix-intervals branch from 95e1fcb to fe0ca6f Compare July 18, 2023 08:28
@DifferentialOrange DifferentialOrange merged commit f2104ee into master Jul 18, 2023
@DifferentialOrange DifferentialOrange deleted the DifferentialOrange/fix-intervals branch July 18, 2023 11:33
DifferentialOrange added a commit that referenced this pull request Jul 19, 2023
Overview

  This release introduces various datetime interval fixes and quality of
  life improvements.

Breaking changes
  - Forbid to create datetime intervals out of Tarantool limits
    (PR #302).

Changed
  - Validate `tarantool.Interval` limits with the same rules as in
    Tarantool (PR #302).

Fixed
  - `tarantool.Interval` arithmetic with weeks (PR #302).
  - `tarantool.Interval` weeks display in `str()` and `repr()`
    (PR #302).
@DifferentialOrange DifferentialOrange mentioned this pull request Jul 19, 2023
DifferentialOrange added a commit that referenced this pull request Jul 19, 2023
Overview

  This release introduces various datetime interval fixes and quality of
  life improvements.

Breaking changes
  - Forbid to create datetime intervals out of Tarantool limits
    (PR #302).

Changed
  - Validate `tarantool.Interval` limits with the same rules as in
    Tarantool (PR #302).

Fixed
  - `tarantool.Interval` arithmetic with weeks (PR #302).
  - `tarantool.Interval` weeks display in `str()` and `repr()`
    (PR #302).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants