fix(types): compare and hash intervals by PostgreSQL duration - #1559
Conversation
|
Awesome. Do you want to try stacking the PRs? You basically change the base branch of this PR to your other PR, and GitHub can convert to a stack we can merge together! |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Thanks! I checked, but GitHub currently doesn't support cross-fork stacks. Both PRs come from my fork, and I have read-only access upstream. This branch already builds directly on #1558, with the interval fix isolated in e261e96d. The available path is to merge #1558 first, then rebase this PR onto |
|
Ah!! That's unfortunate! Okay, let's merge the CI fix first, then let's do the other ones one at a time. Please make sure to sign our CLA; without it, we can't accept contributions. Cheers! |
e261e96 to
848cc3d
Compare
|
Rebased onto main after #1558 merged. This PR now contains only the interval fix. All 27 validation jobs pass. |
Cross-shard interval comparisons use individual fields, so
1 monsorts after31 daysand equivalent values such as1 dayand24 hoursform separate groups. This also produces incorrectMIN/MAXresults.Use one allocation-free
i128duration for ordering, equality, and hashing, matching PostgreSQL's 30-day months and 24-hour days without overflowing the interval range.Regression tests cover equivalent values, mixed signs, extreme ranges, and multi-shard ordering/grouping/min/max in text and binary formats.
Validation: all 27 jobs pass in CI, including strict formatting/Clippy, unit/doc tests, Linux/macOS builds, and all 21 integration suites on PostgreSQL 18.