Commit 526918f
feat(core): RangeFilterExec — sorted-input per-partition range filter (purely additive) (#2262)
* feat(core): RangeFilterExec — sorted-input per-partition range filter (purely additive)
Adds `RangeFilterExec`: filter that applies a per-input-partition
half-open range predicate, widened by the operator's halo. Sibling of
`PerPartitionFilterExec` (which handles arbitrary predicates); RFE
specialises to `[lo, hi)` ranges over a `routing_expr` and gets a
fast path for sorted inputs (binary-search slice + Arc-clone
pass-through when a batch is entirely inside/outside the window).
- Bounds are late-bound via `resolve_bounds`; wire encode refuses
before resolution. Constructors: `try_new_pending`, `try_new_resolved`.
- Halos + bounds use `ScalarValue` at the API + proto surface (generic
over Arrow primitives); internal impl is Float64-only today and
errors on non-Float64 until KLL widens support.
- No in-tree callers — this is purely additive.
- Includes serde roundtrip + fast/slow path unit tests.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* refactor(core): scope DataType import to tests, drop _touch_datatype
DataType was only referenced textually in the test module (via
`DataType::Float64` in schema builders); the non-test build treated
the top-level import as unused, papered over by a `#[allow(dead_code)]
fn _touch_datatype(_: DataType)`. Move the import into `mod tests`
and remove the workaround.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(core): pub-export RangeBound + WidenedBound so RangeFilterExec signatures render as rustdoc links
Both aliases were reachable only through structural spelling — `Vec<(Option<ScalarValue>, Option<ScalarValue>)>` for the raw form, `Vec<(Option<f64>, Option<f64>)>` for the widened form — because `range_filter` is a private module and neither alias was `pub`-re-exported. Rustdoc rendered `try_new_resolved` / `raw_bounds` / `widened_bounds` signatures with bare unlinkable names as a result. Bumping both to `pub` and re-exporting from `execution_plans` restores the signature → alias-page links.
Addresses andygrove's review nits on #2262.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6610280 commit 526918f
5 files changed
Lines changed: 1341 additions & 3 deletions
File tree
- ballista/core
- proto
- src
- execution_plans
- serde
- generated
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
138 | 161 | | |
139 | 162 | | |
140 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
0 commit comments