Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

perf: use extend when buffering partition row indices in the native shuffle writer

オープン 初心者向け
#7,072 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Jbansal2 がすでに取り組んでいます。

2026年10月17日 から。

  • #7097 @Jbansal2 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust, spark

調査の方向性

置き換えるループは native/shuffle/src/partitioners/multi_partition.rs の MultiPartitionShuffleRepartitioner::buffer_partitioned_batch_may_spill にあります。ここでは reserve の呼び出しの後に、行ごとの push 呼び出しが続いています。まずこの関数を読み、cargo bench --bench shuffle_writer でベンチマークをビルドしてから、編集前にベースラインを保存してください。完了の条件は、ループが同じタプルに対する extend に置き換えられていること、ベンチマークがベースラインと比較されていること、そして結果がノイズの範囲内であっても報告されていることです。

索引モデルが issue の本文から書いたものです。

説明

area:shuffle enhancement good first issue performance requires-triage
What is the problem the feature request solves?

MultiPartitionShuffleRepartitioner::buffer_partitioned_batch_may_spill in native/shuffle/src/partitioners/multi_partition.rs pushes the row indices of each partition one at a time after reserve:

indices.reserve(row_indices.len());
for row_idx in row_indices {
    indices.push((buffered_partition_idx, *row_idx));
}

Vec::push re-checks capacity on every iteration. indices.extend(row_indices.iter().map(|&r| (buffered_partition_idx, r))) gets the trusted-length specialization and writes the tuples in one pass.

Describe the potential solution

Replace the loop with extend. Run cargo bench --bench shuffle_writer before and after (save a baseline with --save-baseline before); the change is small, so report the result either way and drop it if it is within noise.

Additional context

Micro item from #5002, carried into #5905. Good first issue.

主要言語
Scala
スター
1.3k
フォーク
391
平均マージ
2日 12時間
マージ済み PR(30日)
432

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/datafusion-comet のほかの issue

apache/datafusion-comet の issue をすべて見る

似ている issue

Scala の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。