Commit 80badc0
committed
fix: restrict stats init to sort pushdown path to avoid over-pruning
Stats init with max(min) threshold can over-prune for non-sorted data:
the threshold may exceed the actual Kth value when rows are distributed
across multiple RGs. This caused output_rows=0 in explain_analyze tests.
Restrict stats init to sort pushdown path where data ordering guarantees
the threshold is a valid lower bound. Keep fuzz test tiebreaker fix as
it's independently correct (SQL doesn't guarantee tie-breaking order).1 parent 18939c9 commit 80badc0
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
845 | 845 | | |
846 | 846 | | |
847 | 847 | | |
| |||
0 commit comments