Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#249 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
28/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
numpy, python, sql
Lĩnh vực
databases, performance

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
142
Fork
19
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của xqlsystems/xarray-sql

Tất cả issue của xqlsystems/xarray-sql

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.