Commit 18939c9
committed
feat: enable stats init for ALL TopK queries + fix fuzz test tiebreaker
Stats init now fires for all TopK queries, not just sort pushdown path.
The null-aware filter (IS NULL OR col > threshold for NULLS FIRST)
ensures correctness when NULLs are present.
Fix fuzz test: add remaining columns as ASC NULLS LAST tiebreakers to
ORDER BY, making the sort fully deterministic. This is the correct
approach since SQL doesn't guarantee tie-breaking order, and any
optimization that changes RG read order may produce different but
equally valid results for tied rows.1 parent 8fb7b00 commit 18939c9
2 files changed
Lines changed: 24 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
| 312 | + | |
315 | 313 | | |
316 | 314 | | |
317 | 315 | | |
318 | 316 | | |
319 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
320 | 335 | | |
321 | 336 | | |
322 | | - | |
| 337 | + | |
323 | 338 | | |
324 | 339 | | |
325 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
846 | 845 | | |
847 | 846 | | |
848 | 847 | | |
| |||
0 commit comments