Commit 2876db4
committed
fix: error on retracting an untracked value in percentile_cont(DISTINCT)
Per review discussion: if `retract_batch` is asked to remove a value not
in the count map, the accumulator's state has diverged from the window
frame and continuing would silently produce wrong results. Return an
`internal_err!` instead of skipping, so the inconsistency surfaces rather
than yielding a wrong answer.
Co-authored-by: Claude Code1 parent 4037b94 commit 2876db4
1 file changed
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
767 | 770 | | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
768 | 777 | | |
769 | 778 | | |
770 | 779 | | |
771 | 780 | | |
772 | | - | |
| 781 | + | |
773 | 782 | | |
774 | 783 | | |
775 | 784 | | |
776 | 785 | | |
777 | | - | |
| 786 | + | |
778 | 787 | | |
779 | 788 | | |
780 | 789 | | |
| |||
0 commit comments