Native approx_top_k functions: audit the frequent-items sketch against Java and implement

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

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

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

評価

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

調査の方向性

This is an audit-first design task spanning the Rust frequencies feature of the sketch crate and Spark-side serde and expression wiring. Start by scoring the family with suggest-native-expression, then compare sketch bytes against DataSketches-Java 6.2.0 fixtures for each item type Spark accepts. Done means byte parity for every supported item type, opt-in native functions, and SQL file tests that read Spark-produced sketch columns and the reverse.

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

説明

area:aggregation area:expressions enhancement

What is the problem the feature request solves?

Part of #7397.

Spark 4.1+ provides approx_top_k, approx_top_k_accumulate, approx_top_k_combine and approx_top_k_estimate, built on the DataSketches frequent-items sketch. None of them run natively in Comet. The crate's frequencies feature provides the sketch.

Describe the potential solution

  1. Score the family with suggest-native-expression first.
  2. Audit the crate's frequencies feature against DataSketches-Java 6.2.0 using committed fixtures. The item type matters here more than in the other families: Spark supports several item types, and each has its own item serialization in the sketch bytes, so check each one Spark accepts rather than only strings. Also check tie-breaking and the order of returned items, the error bounds, and how Spark derives the maximum map size from its arguments.
  3. Implement the serde and native functions once the audit shows byte parity for every supported item type, opt-in until then. Fall back for any item type that is not covered.
  4. Add SQL file tests, including a Spark-produced sketch column read by Comet and the reverse.
主要言語
Scala
スター
1.3k
フォーク
414
平均マージ
3日 5時間
マージ済み PR(30日)
210

環境構築

はじめの一歩

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

apache/datafusion-comet のほかの issue

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

似ている issue

Scala の issue をもっと見る

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

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