Skip to content

Commit 335bc10

Browse files
committed
perf: local-executor WASM scan path now skips fragments via canSkipFragment
Previously iterated all fragments without checking fragment-level min/max stats. Now calls canSkipFragment before building a FragmentSource, avoiding disk I/O for fragments where filters eliminate all rows.
1 parent 7ca725a commit 335bc10

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/local-executor.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,9 @@ export class LocalExecutor implements QueryExecutor {
953953
const fragments: FragmentSource[] = [];
954954

955955
for (const [, meta] of dataset.fragmentMetas) {
956+
// Skip entire fragment if min/max stats eliminate it
957+
if (canSkipFragment(meta, query.filters, query.filterGroups)) continue;
958+
956959
const neededCols = new Set(query.projections.length > 0 ? query.projections : meta.columns.map(c => c.name));
957960
for (const f of query.filters) neededCols.add(f.column);
958961
if (query.filterGroups) for (const g of query.filterGroups) for (const f of g) neededCols.add(f.column);

0 commit comments

Comments
 (0)