Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Perf: expose natural Xarray scan ordering to eliminate redundant SQL sorts

Aperta
#249 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
28/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
numpy, python, sql

Direzione di ricerca

Start with the XarrayScanExec node and its PlanProperties in the native DataFusion provider, then reproduce the ordered EXPLAIN plan that shows SortExec above it. Check whether the scan can declare C-order within each partition and time-range ordering across partitions, so DataFusion can choose SortPreservingMergeExec. Done means ordered results stay exact and a regression test shows no SortExec for an order that matches the dataset's dimension order.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

🤖 Samudra's canonical data-loader experiment found that ORDER BY time, lat, lon is a material part of point-read latency even though XarrayScanExec already emits each dense block in C-order.

Local benchmark setup: an uncompressed float32 Zarr store with 32 times, 16 variables, a 180×360 grid, chunks=None at Xarray open, and XQL scan partitions of {"time": 1}. Selecting four times and all 16 variables took approximately:

  • ordered DataFusion collection: 21 ms
  • the same query without ORDER BY: 13 ms

The ordered physical plan contains:

SortPreservingMergeExec: time, lat, lon
  SortExec: time, lat, lon
    FilterExec: time IN (...)
      RepartitionExec
        XarrayScanExec

For an ML loader, relying on unspecified result order is not acceptable, and scattering unordered rows in NumPy erased the saved time. Could the native provider declare the scan's natural intra-partition ordering in PlanProperties, plus enough partition-range ordering for DataFusion to use a preserving merge instead of sorting the cells?

A useful regression test would assert both exact ordered results and the absence of SortExec in EXPLAIN for an order compatible with the dataset's dimension order. This may also reduce sort-buffer memory for dense-grid round trips.

Lingua principale
Python
Stelle
142
Fork
19
Merge medio
1g 9h
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di xqlsystems/xarray-sql

Tutte le issue di xqlsystems/xarray-sql

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.