Repository navigation
Commit a321213
test: pin the date_bin explicit-origin DST drift
Section 9 already had a `date_bin(..., origin)` case, but all of its data sits
inside a single July day, so it never crosses a transition and the drift is
invisible.
Adds a case whose two rows are the same local time of day on either side of the
America/Denver spring-forward transition, with the origin chosen so bins land
on local midnight. The first row does; the second lands on 01:00 local. That is
the bug in apache#25168 -- `date_bin`
steps a fixed number of nanoseconds from a fixed instant, so it cannot track a
local day that is 23 or 25 hours long.
`date_trunc` is asserted alongside as a control: it gets both rows right, so
the drift is a property of the origin arithmetic rather than of the data.
Co-Authored-By: Claude Opus 5 <[email protected]>1 parent 920c73f commit a321213
1 file changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
733 | 768 | | |
734 | 769 | | |
735 | 770 | | |
| |||
0 commit comments