Deduplicate spark_ceil and spark_floor and port floor's decimal boundary tests to ceil
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 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 的特定性。当移植后的测试在 native/spark-expr 中通过 cargo test 时即完成。第二步中的共享模块重构属于设计工作,应交由维护者处理。
由索引模型根据 Issue 内容生成。
描述
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
- Port floor's boundary and large-scale tests to ceil. This is the quick win and could land on its own.
- Move the shared decimal rounding into
math_funcs/utils.rs, generic over a rounding mode (e.g. a trait withCeil/Floormarker types providing the i64 and i128 division), and makespark_ceil/spark_floorthin wrappers over one generic function. Parameterise the tests by mode.
Additional context
Line references are pinned to commit 7d8d9b1544b7.
- 主要语言
- Scala
- 星标
- 1.3k
- 派生
- 387
- 平均合并
- 2 天 8 小时
- 30 天内合并 PR
- 422
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/datafusion-comet 的其他 Issue
-
requires-triage
难度 2/5 1-3 小时 新手友好度 68/100
apache/datafusion-comet#7001 ·
维护者通常 1 天内回复
-
Extract shared list-array construction from the split_* functions in split.rs可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area:expressions enhancement good first issue help wanted requires-triage rust tech debt
难度 2/5 1-3 小时 新手友好度 82/100
apache/datafusion-comet#6983 ·
维护者通常 1 天内回复
-
Iceberg data tables whose names end with a metadata-table name fall back to Spark可能重新可做 @aryan9948 于 9 天前认领,目前没有进行中的 PR。 未关闭requires-triage
难度 2/5 1-3 小时 新手友好度 75/100
apache/datafusion-comet#6719 · 1 条评论 ·
维护者通常 1 天内回复
-
ANSI integral SUM overflow reports "integer overflow" without Spark's try_add suggestion可能已有人在做 @0lai0 于 9 天前认领。 未关闭area:aggregation bug priority:medium
难度 2/5 1-3 小时 新手友好度 82/100
apache/datafusion-comet#6661 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Native from_json with a schema that repeats a field name fails with "ArrowArray struct has 2 children (expected 1)"可能已有人在做 @Samearth17 于 10 天前认领。 未关闭area:expressions area:ffi bug good first issue priority:medium
难度 2/5 1-3 小时 新手友好度 70/100
apache/datafusion-comet#6592 ·
维护者通常 1 天内回复
查看 apache/datafusion-comet 的全部 Issue
相似的 Issue
-
[Bug] HiveDialect shares its colspecs dict with SQLAlchemy's DefaultDialect (python/pyhive)可能已有人在做 @rusackas 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 80/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
? - Needs Triage documentation user_tools
难度 2/5 半天 新手友好度 62/100
NVIDIA/cudf-spark-tools#2190 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
lichess-org/lila#22088 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复