Clustered (fanout disabled) writes fail on sorted input because batches are split in HashMap order
Maintainer thường phản hồi trong vòng 1 ngà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
- 55/100
Hướng nghiên cứu
Start with crates/datafusion/src/task_writer.rs at the linked splitter and ClusteredWriter call sites, then inspect crates/iceberg/src/arrow/record_batch_partition_splitter.rs. Reproduce by executing IcebergTableProvider::insert_into directly with fanout disabled, batch_size 8, target_partitions 1, and 200 rows. Done means sorted partitioned input writes successfully without the previously closed partition error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
With fanout disabled, TaskWriter splits each batch with iceberg-rust's RecordBatchPartitionSplitter::split and hands the pieces to ClusteredWriter (task_writer.rs#L129-L135, task_writer.rs#L217-L237).
The splitter groups rows in a HashMap, so the partitions within a batch come out in arbitrary order. ClusteredWriter closes the current partition when it sees a different one, and rejects any partition it has already closed. Input that is correctly sorted by partition therefore fails whenever a partition spans a batch boundary. For example, batch N holds [A, B] but is emitted as B then A, and batch N+1 starts with B.
To Reproduce
Execute the plan returned by IcebergTableProvider::insert_into directly, so the SortExec is still present (#38 explains why the optimized plan loses it). Use a table partitioned by identity(cat) with fanout disabled, 200 rows with cat = id % 10, batch_size = 8 and target_partitions = 1.
9 of 10 runs fail with:
The input is not sorted! Cannot write to partition that was previously closed
Expected behavior
Input sorted by partition is written successfully.
Additional context
Fixing #38 alone won't make fanout-disabled writes work. The splitter lives in iceberg-rust (crates/iceberg/src/arrow/record_batch_partition_splitter.rs). Either it emits partitions in first-occurrence order, or TaskWriter orders each batch's pieces by row position before passing them to ClusteredWriter.
- Ngôn ngữ chính
- Rust
- Star
- 30
- Fork
- 30
- Merge trung bình
- 3 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/datafusion-iceberg
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
apache/datafusion-iceberg#100 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
apache/datafusion-iceberg#85 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
apache/datafusion-iceberg#84 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
apache/datafusion-iceberg#75 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Slow CI runnersĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
apache/datafusion-iceberg#74 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/datafusion-iceberg
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
🐞 bug 🧩 bevy_gantz_egui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
nannou-org/gantz#500 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature]: Fedora 45 repoĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
metasequoiaime/msime#10989 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
fritzprix/libr-agent#2612 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
find: -printf %h drops a doubled slashCó thể đã có người làm @qodelicious đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày