Exact reverse parquet scan counts shared buffers once per batch in its memory reservation

Đang mở
#27,254 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

@vinycalves đang làm issue này rồi.

Từ ngày 12/11/2026.

  • #27366 của @vinycalves — đang mở

Đá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
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust

Hướng nghiên cứu

Start by reading the exact reverse scan implementation introduced for #27079 and its memory reservation logic, then inspect how batches from one row group share Arrow buffers. Reproduce with the issue's 1M-row, 4,000-distinct-string example and compare pool usage against the plan with the option off. Done means the reservation counts each distinct shared buffer once across held batches and the reproduction no longer fails below its actual memory use.

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

Mô tả

With datafusion.execution.parquet.enable_exact_reverse_scan (#27079), the scan buffers one decoded row group and charges each batch's get_array_memory_size() to the memory pool. Batches of the same row group can share buffers, such as a page dictionary, so a shared buffer is counted once per batch. The scan cannot spill, so a query can fail with a resources error well below its real memory use.

Example from the #27079 review: 1M rows with 4000 distinct strings (about 25 MB). A 100 MB pool fails in the reverse scan, while the plan with the option off finishes at 30 MB by spilling in the sort.

The reservation should count each distinct buffer once across the batches it holds. This should be fixed before the option is enabled by default.

Related: #27079, #19048

Ngôn ngữ chính
Rust
Star
9.6k
Fork
2.6k
Merge trung bình
3 ngày 4 giờ
Pull request đã merge (30 ngày)
345

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 apache/datafusion

Tất cả issue của apache/datafusion

Issue tương tự

Thêm issue về Rust

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.