Clustered (fanout disabled) writes fail on sorted input because batches are split in HashMap order
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 30
- フォーク
- 30
- 平均マージ
- 3日 19時間
- マージ済み PR(30日)
- 15
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/datafusion-iceberg のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/datafusion-iceberg#100 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
apache/datafusion-iceberg#85 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
apache/datafusion-iceberg#84 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
apache/datafusion-iceberg#75 ·
メンテナーはふだん 1 日以内に返信
-
Slow CI runnersオープン
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
apache/datafusion-iceberg#74 ·
メンテナーはふだん 1 日以内に返信
apache/datafusion-iceberg の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
🐞 bug 🧩 bevy_gantz_egui
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
nannou-org/gantz#500 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
metasequoiaime/msime#10989 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
fritzprix/libr-agent#2612 ·
メンテナーはふだん 1 日以内に返信
-
find: -printf %h drops a doubled slash対応中かも @qodelicious が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信