Commit a5db932
perf(core): RangeFilterExec min/max fast paths + binary-search slice
When `input.output_ordering()` leads with `routing_expr` ascending, take one
of three shortcuts on each batch before `filter_record_batch`:
- `last < lo` or `first >= hi` → drop the whole batch (skip).
- `first >= lo && last < hi` → pass the batch through unchanged (Arc-clone).
- mixed → `partition_point` on the Float64Array values
for lo/hi indices + `RecordBatch::slice`
(zero-copy view).
Nullable routing columns fall back to `filter_record_batch` on a per-batch
basis (Float64Array::values() returns garbage for null slots, breaking
partition_point). `sorted_on_key` is derived at construction — no config knob.
h2o Q8 with 2 execs × 4 vcores × MPT=4:
scale cap parallel_window=false parallel_window=true speedup
1e7 2G 7.6 s 2.5 s 3.0×
1e8 4G 143 s 92 s 1.55×
The 1e8 delta is smaller because the bottleneck shifts to shuffle IO /
whole-file merge memory — the ValueIndex + per-task halo work next.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6999461 commit a5db932
2 files changed
Lines changed: 385 additions & 26 deletions
0 commit comments