Skip to content

Commit aa4a183

Browse files
committed
docs: update roadmap and executor comment for LIKE/NOT IN/NOT BETWEEN pushdown
1 parent 6d3f02b commit aa4a183

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

research/zig-engine-roadmap.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,16 @@ Learnings from sibling Zig repos, prioritized by impact on QueryMode's WASM engi
5353

5454
**Done:** TS `scanFilterIndices()` handles compound AND (intersect index arrays via WASM `intersectIndices`). WASM SQL path (`executeSql`) already evaluates WHERE vectorized in Zig. `unionIndices` upgraded to O(n+m) sorted merge. `WasmAggregateOperator` supports filtered aggregates via indexed aggregate exports (`sumFloat64Indexed`, etc.) — zero Row[] materialization for filter+aggregate queries. Short-circuit evaluation: both `scanFilterIndices` and `WasmAggregateOperator` bail immediately when any AND filter returns 0 matches. `filterInt64Buffer` SIMD128 added for int64 column filtering.
5555

56+
### LIKE / NOT IN / NOT BETWEEN / NOT LIKE Filter Pushdown — DONE
57+
- SQL compiler now flattens LIKE, NOT LIKE, NOT IN, NOT BETWEEN into FilterOp[] (was falling through to SqlWrappingExecutor)
58+
- `matchesFilter()` handles all four ops in JS evaluation path
59+
- `canSkipPage()` handles NOT BETWEEN (skip if all values within [lo, hi])
60+
- Client API: `.whereLike()`, `.whereNotLike()`, `.whereIn()`, `.whereNotIn()`, `.whereNotBetween()`
61+
- `canUseWasmAggregate()` correctly rejects non-numeric ops
62+
- `scanFilterIndices` guards new ops from WASM-only numeric paths
63+
5664
**Remaining:**
5765
- OR support in TS scan-time filter (union index arrays via `unionIndices` — already implemented in Zig, needs API/type changes for compound filter groups)
58-
- LIKE in the WASM filter fast path (BETWEEN is done — see below)
5966

6067
### BETWEEN Support — DONE
6168
- `filterFloat64Range`, `filterInt32Range`, `filterInt64Range` Zig exports

src/sql/executor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
/**
22
* SqlWrappingExecutor — applies SQL features that can't be pushed down to FilterOp[].
33
*
4-
* Handles: OR conditions, LIKE, NOT IN, NOT BETWEEN, HAVING, multi-column ORDER BY,
4+
* Handles: OR conditions, HAVING, multi-column ORDER BY,
55
* and computed SELECT expressions (CASE, CAST, arithmetic).
66
*
7+
* LIKE, NOT IN, NOT BETWEEN are now flattened into FilterOp[] by the compiler.
8+
*
79
* The inner executor still receives FilterOp[] for page-level pushdown optimization.
810
* This executor applies the remaining logic on the result rows.
911
*/

0 commit comments

Comments
 (0)