Perf: limit pushdown — avoid materializing full partitions for LIMIT queries
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- python
- Ambito
- data, performance
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 142
- Fork
- 19
- Merge medio
- 1g 9h
- PR unite (30g)
- 9
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di xqlsystems/xarray-sql
-
documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
xqlsystems/xarray-sql#268 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
xqlsystems/xarray-sql#267 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 74/100
xqlsystems/xarray-sql#243 ·
I maintainer di solito rispondono entro 1 giorno
-
publish.yml: the TestPyPI verification step is unreachable (and installs the wrong package name)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
xqlsystems/xarray-sql#242 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
xqlsystems/xarray-sql#237 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di xqlsystems/xarray-sql
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
SublimeText/AdvancedNewFile#211 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
Imbad0202/academic-research-skills#987 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Pull-through from gcr.io returns 500 when pulling using podman/buildahForse già presa Una pull request collegata a questa issue è aperta o già unita. ApertaIssue Triage-Needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pulp/pulp_container#2581 ·
I maintainer di solito rispondono entro 1 giorno