[VL] Consistent Exception Handling With Spark
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- backend, distributed-systems
Línea de trabajo
Start by reading the translateException hook in gluten-arrow/src/main/java/org/apache/gluten/vectorized/ColumnarBatchOutIterator.java and the error propagation in cpp/core/jni/JniError.h. Compare the Spark and Velox exception behavior described here, then review the alternatives and user experience tradeoff with maintainers. Done means the project has decided whether and how Gluten should translate Velox exceptions to Spark exceptions.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
Hey folks
I was hoping to get feedback on a proposal.
Proposal
Translate Velox generated exception to Spark exceptions to maintain consistent exception semantics with Spark. The necessary hooks have already been provided in translateException
Current State
- Today when we enable new Velox operators in gluten we propagate the Velox exception message via a gluten exception
- The Velox exception can be different than that of Spark. For example:
Spark JVM:
"Exceeds char/varchar type length limitation: 5"
Velox:
"Exceeds allowed length limitation: 5"
Why It's an Issue
Let me explain using an example. In #12976 a new Velox operator was enabled in Gluten:
- Enabling the operator was 1 line of change (remove if from the
kBlackListarray:
const std::unordered_set<std::string> kBlackList = {"split_part", "sequence", "approx_percentile", "map_from_arrays"};
- However after enabling the operator it starts to raise a different type of exception, causing the spark tests that assert the exception to fail. This caused 20+ sparks tests that relied on the operator to fail which required exclusion such as:
...
.excludeGlutenTest("NOT NULL checks for nullable map with required values (byName)")
.excludeGlutenTest("NOT NULL checks for nullable map with required values (byPosition)")
.excludeGlutenTest("NOT NULL checks for fields inside nullable maps (byPosition)")
...
To avoid losing test coverage spark tests were copied over adding 800 lines of test code (duplicate code with spark tests with a few lines different during exception assertions).
User Experience
This would change user experience though which needs a decision on the repo. User would no longer be receiving a gluten specific error message and the experience would be transparent regardless of which execution engine is running spark. A decision that the repo would need to make if its the correct experience.
Alternative Solution, Option 2
Regarding reason2 we could rely on Apache spark to enable the exception assertions in their tests to be extensible such as assertLengthCheckFailure.
The challenge with this is:
- The spark team seems reluctant of adding these extensions (please see comment)
- The extensions would only help with spark versions going forward and previous spark versions would still have the code duplication
Alternative Solution, Option 3
We rely on Velox to throw exceptions consistent with Spark. My understanding is that Velox does strive to be agnostic to the specific data processing system that uses it so incorporating these changes there might prove challenging.
Gluten version
main branch
- Lenguaje dominante
- Scala
- Estrellas
- 1.6k
- Forks
- 685
- Merge medio
- 4 d 16 h
- PR fusionados (30 d)
- 84
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- 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/gluten
-
[CORE] Selecting a cost model the backend has no coster for fails with ClassNotFoundExceptionPosiblemente ocupada @LuciferYang la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 3 días
-
bug unit testing velox backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/gluten#13463 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 3 días
-
[VL] madvise(WILLNEED) call fails in MmapFileStream because of wrong calculation of fetching lengthQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
Todos los issues de apache/gluten
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
rchillyard/TableParser#206 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
? - Needs Triage bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
NVIDIA/cudf-spark#17063 ·
Los mantenedores suelen responder en 2 días
-
bug 🐞 User issue 🚨
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
valkey-io/valkey-glide#7813 · 2 comentarios ·
Los mantenedores suelen responder en 1 día