Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#249 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
28/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
numpy, python, sql

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

🤖 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.

Lenguaje dominante
Python
Estrellas
142
Forks
19
Merge medio
1 d 9 h
PR fusionados (30 d)
9

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de xqlsystems/xarray-sql

Todos los issues de xqlsystems/xarray-sql

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.