Backport ANSI skipped-operand fix for arithmetic and concat to branch-1.2
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Read docs/source/contributor-guide/backporting.md and compare the branch-1.2 implementation using NullShortCircuit with the fix proposed in PR 7456, which depends on LazyLogical from PR 7326. Reproduce the ANSI-mode query in the issue and investigate whether wrapping operands gives Spark-compatible results and what performance tradeoff it introduces. Done means proposing and implementing a viable backport approach with correctness and performance addressed.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
branch-1.2 has the ANSI bug from https://github.com/apache/datafusion-comet/issues/7246 for arithmetic and concat: native Comet evaluates an operand on rows where Spark skips it, so a query Spark answers fails with CAST_INVALID_INPUT. For example, with spark.sql.ansi.enabled=true:
CREATE TABLE t(n int, txt string) USING parquet;
INSERT INTO t VALUES (NULL, 'bad'), (3, '6');
SELECT n + CAST(txt AS INT) FROM t; -- Spark: NULL, 9. Comet: CAST_INVALID_INPUT
The fix on main is https://github.com/apache/datafusion-comet/pull/7456 (not merged yet). It cannot be cherry-picked as is: it builds on https://github.com/apache/datafusion-comet/pull/7326 (LazyLogical, speculative evaluation), which branch-1.2 does not have. branch-1.2 does have NullShortCircuit (https://github.com/apache/datafusion-comet/pull/6716), so a backport could wrap the operands without speculation.
This issue tracks whether, and how, to backport the fix to branch-1.2, as docs/source/contributor-guide/backporting.md asks for a correctness fix.
Steps to reproduce
Run the query above on branch-1.2 with ANSI mode on.
Expected behavior
Comet returns the same result as Spark: NULL where n is NULL, without evaluating CAST(txt AS INT) there.
Additional context
- Without speculation, the wrapped form is up to about 2x slower than eager evaluation for cheap operands such as
a * (b - c)on batches with NULLs (benchmark in https://github.com/apache/datafusion-comet/pull/7456). Maintainers may prefer to backport with speculation included, or to accept the slowdown for correctness. - Once https://github.com/apache/datafusion-comet/pull/7456 merges, the backport would be decided per
backporting.md.
Willingness to contribute
I can contribute a fix for this bug independently
- Lenguaje dominante
- Scala
- Estrellas
- 1.3k
- Forks
- 414
- Merge medio
- 3 d 5 h
- PR fusionados (30 d)
- 210
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
-
requires-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/datafusion-comet#7583 ·
Los mantenedores suelen responder en 2 días
-
bug priority:medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
apache/datafusion-comet#7559 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
area:writer bug priority:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/datafusion-comet#7558 ·
Los mantenedores suelen responder en 2 días
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/datafusion-comet#7557 ·
Los mantenedores suelen responder en 2 días
-
`rand` and `randn` with an integer seed fall back to Spark without a fallback reasonPosiblemente ocupada @galaxytemple la tomó hace 3 días. Abiertorequires-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/datafusion-comet#7479 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 2 días
Todos los issues de apache/datafusion-comet
Issues similares
-
A-api C-bug S-ready-for-human
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
ergoplatform/ergo#2932 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
lichess-org/lila#22454 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
chipsalliance/rocket-chip#3845 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
Los mantenedores suelen responder en 13 días