perf: filter evaluation in filtered reads runs on one thread
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- data, performance
Línea de trabajo
Start in rust/lance/src/io/exec/filtered_read.rs and trace how wrap_with_filter calls batch_filter in the try_buffered stream; compare that with the spawned decode work and lance_core::utils::tokio::spawn_cpu. Preserve batch order, the soft limit, and early-stop behavior. Run the order, limit, and early-stop tests in io::exec::filtered_read, then the scanner suites; done means they pass and filter evaluation can use multiple cores.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
CPU-heavy filters run on a single thread in the filtered read, whatever the number of fragments or available cores. Examples: JSONPath (json_exists), regex, LIKE on large strings, ST_*, and higher-order functions.
In rust/lance/src/io/exec/filtered_read.rs, batch decode runs on spawned tasks, but wrap_with_filter applies datafusion_physical_plan::filter::batch_filter(batch, &filter) inside a .map() on each batch's future. That closure runs on whichever task polls the try_buffered stream, so filter evaluation is serialized onto one thread.
Evidence
On an Apple M4 Pro (14 cores), 1M rows, a full-scan filter json_exists(detections, '$[*] ? (@.label == "car" && @.confidence > .9)') gave:
| Fragments | Wall (p50) | Cores busy |
|---|---|---|
| 1 | 4.34 s | 1.02 |
| 12 | 4.30 s | 1.01 |
| 16 | 4.35 s | 0.98 |
At 10M rows the same count takes about 41 s, still on one core. A decode-heavy read of a list<struct> column on the same machine, with a cheap filter, keeps about 4 cores busy, because decode is spawned.
Proposal
Evaluate the filter inside the spawned decode work, for example via lance_core::utils::tokio::spawn_cpu, keeping batch order, the soft limit and early-stop behaviour. We prototyped this behind an environment switch (inline vs spawn_cpu). The order, limit and early-stop tests in io::exec::filtered_read, and the scanner suites, pass in both modes. We'll add A/B timings here. We can open a PR.
- Lenguaje dominante
- Rust
- Estrellas
- 7.3k
- Forks
- 929
- Merge medio
- 2 d 20 h
- PR fusionados (30 d)
- 575
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de lance-format/lance
-
bug(python): read_transaction raises TypeError on a Rewrite with rewritten indicesPosiblemente ocupada @Borg93 la tomó hace 1 día. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
lance-format/lance#11117 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
lance-format/lance#10782 ·
Los mantenedores suelen responder en 2 días
-
Upgrade DataFusion for the unparser stack-overflow fixQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
lance-format/lance#8225 ·
Los mantenedores suelen responder en 2 días
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
lance-format/lance#6425 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
Expose compute_pq_distanceQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertoenhancement
Dificultad 1/5 1-3 horas Aptitud para principiantes 62/100
lance-format/lance#5675 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de lance-format/lance
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
oxc-project/tsrs#1010 ·
Los mantenedores suelen responder en 1 día
-
Link is deadAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 63/100
nicholas-ochoa/OpenSC2K#104 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
libracoder/kiri#445 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
DioxusLabs/blitz#1614 ·
Los mantenedores suelen responder en 1 día