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

Deduplicate spark_ceil and spark_floor and port floor's decimal boundary tests to ceil

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

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

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

2026年10月15日 から。

評価

難易度
2/5
見積もり時間
半日
初心者へのやさしさ
68/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
backend

調査の方向性

native/spark-expr/src/math_funcs/floor.rs の境界値テスト、test_floor_decimal128_i64_boundary_array と test_floor_decimal128_large_scale_array から始め、それらを ceil.rs と比較してください。ceil.rs にはこれらがありません。両方のテストを decimal_ceil_pow10 に対して ceil.rs へ移植し、期待値は ceil 固有のものを維持してください。移植したテストが native/spark-expr で cargo test を通過すれば完了です。2つ目のステップの共有モジュールのリファクタリングは設計作業のため、メンテナーに任せてください。

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

説明

area:expressions enhancement help wanted requires-triage rust tech debt
What is the problem the feature request solves?

native/spark-expr/src/math_funcs/ceil.rs and floor.rs are the same module with ceil/floor and div_ceil/div_floor swapped. The spark_* dispatch, decimal_*_f, decimal_*_pow10::<EXP> with its i64 fast path, and the cold *_wide fallback are identical, as are the first seven tests.

The copies have already diverged in their tests. floor.rs has test_floor_decimal128_i64_boundary_array and test_floor_decimal128_large_scale_array, which exercise the i64/i128 switch and the runtime fallback. ceil.rs has neither, even though decimal_ceil_pow10 has the same boundary logic. Any future fix to the fast path has to be made twice, and today only floor's version is tested at the boundary.

Describe the potential solution
  1. Port floor's boundary and large-scale tests to ceil. This is the quick win and could land on its own.
  2. Move the shared decimal rounding into math_funcs/utils.rs, generic over a rounding mode (e.g. a trait with Ceil/Floor marker types providing the i64 and i128 division), and make spark_ceil/spark_floor thin wrappers over one generic function. Parameterise the tests by mode.
Additional context

Line references are pinned to commit 7d8d9b1544b7.

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

環境構築

はじめの一歩

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

apache/datafusion-comet のほかの issue

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

似ている issue

Scala の issue をもっと見る

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

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