Comet Native Executors: sample a range exchange without re-running the stages below it

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

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

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust, scala

調査の方向性

Start with range_exchange in native/native-executors/src/assembly.rs and collect in src/frontend.rs to trace how sampling runs the stages below an exchange. Compare the proposed approaches, including materialized shuffle reuse and runtime sampling; done means range exchanges can be sampled without repeatedly rerunning lower stages. The issue does not select an approach, so clarify the design before implementation.

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

説明

enhancement requires-triage
What is the problem the feature request solves?

To range-partition an exchange, the Comet scheduler (#7289) runs a sampling job of its own: a SampleExec over the stage that feeds the exchange. That is a separate Ballista job, so it runs that stage and every stage below it, then the query runs them all again. Every further range exchange above them adds another run. Spark's RangePartitioner also re-runs the child, but it reuses the shuffle outputs below it.

The sampling jobs also run one after another while the query is being planned, even for range exchanges whose inputs don't depend on each other.

Describe the potential solution

Options, roughly from least to most work:

  • Sample range exchanges whose inputs are independent concurrently.
  • Sample from the materialized shuffle output below the exchange, so only the producing stage runs twice.
  • Find the split points at run time, as Ballista's adaptive planner does for window functions: RuntimeStatsExec keeps a quantile sketch and UnorderedRangeRepartitionExec cuts by it. That covers only the first sort key today, so it would need compound keys. The driver-side sampler, SampleExec and its codec would then go away.
Additional context

The sampling is range_exchange in native/native-executors/src/assembly.rs and collect in src/frontend.rs.

Part of #7288.

Willingness to contribute

Yes. I can contribute this feature independently.

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

環境構築

はじめの一歩

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

apache/datafusion-comet のほかの issue

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

似ている issue

Scala の issue をもっと見る

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

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