Deduplicate spark_ceil and spark_floor and port floor's decimal boundary tests to ceil
Los mantenedores suelen responder en 1 día
@med9110 ya está trabajando en esto.
Desde el 15/10/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 68/100
Línea de trabajo
Empieza con las pruebas de límites en native/spark-expr/src/math_funcs/floor.rs, test_floor_decimal128_i64_boundary_array y test_floor_decimal128_large_scale_array, y compáralas con ceil.rs, que no las tiene. Porta ambas pruebas a ceil.rs contra decimal_ceil_pow10, manteniendo los valores esperados específicos de ceil. Se considera terminado cuando las pruebas portadas pasan con cargo test en native/spark-expr. El refactor del módulo compartido del segundo paso es trabajo de diseño y debe dejarse a un mantenedor.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Scala
- Estrellas
- 1.3k
- Forks
- 391
- Merge medio
- 2 d 12 h
- PR fusionados (30 d)
- 428
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/datafusion-comet
-
enhancement
Dificultad 1/5 1-3 horas Aptitud para principiantes 83/100
apache/datafusion-comet#7101 ·
Los mantenedores suelen responder en 1 día
-
Native hashing of NullType and ANSI interval values fails with "Unsupported data type in hasher"Posiblemente ocupada @ump45nose la tomó hace 1 día. Abiertoarea:expressions area:shuffle bug priority:high
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
apache/datafusion-comet#7063 ·
Los mantenedores suelen responder en 1 día
-
requires-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/datafusion-comet#7001 ·
Los mantenedores suelen responder en 1 día
-
Extract shared list-array construction from the split_* functions in split.rsPosiblemente ocupada @arminazimi la tomó hace 3 días. Abiertoarea:expressions enhancement good first issue help wanted requires-triage rust tech debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apache/datafusion-comet#6983 ·
Los mantenedores suelen responder en 1 día
-
Iceberg data tables whose names end with a metadata-table name fall back to SparkQuizá libre de nuevo @aryan9948 la tomó hace 12 días y no hay ningún pull request abierto. Abiertorequires-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
apache/datafusion-comet#6719 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/datafusion-comet
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
scope:security type:aquasec
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
AbsaOSS/atum-service#494 ·
-
Send camera_pitch and camera_roll to the AI API so validator crops can be tilt-correctedPosiblemente ocupada @jonfroehlich la tomó hace 1 día. AbiertoAI Auto-validate
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ProjectSidewalk/SidewalkWebpage#5788 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
A-network C-bug S-ready-for-human
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ergoplatform/ergo#2741 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
scalameta/metals-zed#99 ·