Perf: limit pushdown — avoid materializing full partitions for LIMIT queries
Los mantenedores suelen responder en 1 día
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
- Tranquilo
- Stack tecnológico
- python
- Área
- data, performance
Línea de trabajo
Start by reading PrunableStreamingTable::scan() and the path that carries the limit through PyArrowStreamPartition into the partition factory; the issue names no file or test. Check how projection is passed as a model, then determine how the factory can stop producing rows at the requested limit. Done means a query such as SELECT * FROM ds LIMIT 10 avoids materializing the full first matching partition.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
The partition factory always materializes the full partition regardless of query:
df = pivot(ds.isel(block)) # always loads all 38.4M rows
For queries like SELECT * FROM ds LIMIT 100, DataFusion applies the limit after the factory produces its batch. The factory receives no signal to stop early.
Currently limit is passed from PrunableStreamingTable::scan() down to DataFusion's StreamingTable, which applies it at the execution-plan level — but only after the factory has already materialized the full partition.
Proposed fix
Pass an optional row limit into the factory (similar to projection pushdown). The scan() method can thread the limit through PyArrowStreamPartition so the factory can stop generating rows once the limit is reached.
def make_stream(projection, limit=None) -> pa.RecordBatchReader:
rows_needed = limit or total_rows
# only materialize up to rows_needed rows
Impact
For ARCO-ERA5, LIMIT 10 currently reads 38.4M rows from the first matching partition. With this fix it would read at most batch_size rows.
Parent: #126
- Lenguaje dominante
- Python
- Estrellas
- 142
- Forks
- 19
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 9
Preparar el entorno
- Sin Dockerfile ni 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 xqlsystems/xarray-sql
-
documentation
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
xqlsystems/xarray-sql#268 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
xqlsystems/xarray-sql#267 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
xqlsystems/xarray-sql#243 ·
Los mantenedores suelen responder en 1 día
-
publish.yml: the TestPyPI verification step is unreachable (and installs the wrong package name)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
xqlsystems/xarray-sql#242 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
xqlsystems/xarray-sql#237 ·
Los mantenedores suelen responder en 1 día
Todos los issues de xqlsystems/xarray-sql
Issues similares
-
`image_generation`: `max_retries` is ignored for OpenAI-compatible providers (always 2 retries)Posiblemente ocupada @ericz7900 la tomó hoy. Abiertollm translation
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
rheeloaded/paperpull#117 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
agenda-tech-brasil/agenda-tech-brasil#1619 · 1 comentario ·
-
process
Dificultad 1/5 1-3 horas Aptitud para principiantes 76/100
pyrite-wiki/pyrite#1036 ·
Los mantenedores suelen responder en 1 día