JSONL File Scan reads a JSON null as the text "null"
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 86/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- scala
- Área
- data-engineering
Línea de trabajo
Comienza en JSONUtils.JSONToMap e inspecciona el manejo del nodo de valor para JSON null. Ejecuta JSONUtilsSpec, incluidas sus dos aserciones para null, y verifica la reproducción de JSONL File Scan con {"a":1} y {"a":null}. Se considera terminado cuando null sigue siendo un valor vacío y la inferencia del esquema produce una columna INTEGER en lugar de STRING.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened?
The JSONL File Scan reads a JSON null as the text "null". One null in a column is enough to make the whole column STRING, so a column of numbers comes out as text and its missing value is the word null rather than an empty cell. A sort, a filter or any arithmetic downstream then works on the wrong type.
The cause is JSONUtils.JSONToMap: a null is a value node, so it takes the child.asText() branch, and NullNode.asText() returns "null". Schema inference then fails to parse "null" as a number and widens the column to STRING.
Two assertions in JSONUtilsSpec expect "null" today. They were added in #4716, whose description says the spec pins the current behavior so that a fix has to update it on purpose.
How to reproduce?
- Upload a JSONL file with these two lines:
{"a":1} {"a":null} - Add a JSONL File Scan that reads it and run the workflow.
- Column
ais inferred as STRING, and the two rows hold the text"1"and the text"null". Expected: INTEGER, with1and an empty value.
Version/Branch
1.4.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
53052c482
What browsers are you seeing the problem on?
No response
Relevant log output
Schema[Attribute[name=a, type=string]]
row 1: '1' (String)
row 2: 'null' (String)
- Lenguaje dominante
- Scala
- Estrellas
- 316
- Forks
- 189
- Merge medio
- 4 d 5 h
- PR fusionados (30 d)
- 165
Preparar el entorno
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/texera
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
apache/texera#8682 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apache/texera#8300 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/texera#8235 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
apache/texera#8150 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/texera
Issues similares
-
arrays_zip with two same-named inputs fails with "ArrowArray struct has 2 children (expected 1)"Abiertobug requires-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/datafusion-comet#6251 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
lichess-org/lila#21826 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
ergoplatform/ergo#2579 ·
Los mantenedores suelen responder en 2 días
-
x:action/improve x:size/tiny x:type/content
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
typelevel/sbt-typelevel#929 ·