JSONL File Scan reads a JSON null as the text "null"
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 86/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- scala
- Ambito
- data-engineering
Direzione di ricerca
Inizia da JSONUtils.JSONToMap e ispeziona la gestione del nodo valore per JSON null. Esegui JSONUtilsSpec, incluse le sue due asserzioni per null, e verifica la riproduzione di JSONL File Scan con {"a":1} e {"a":null}. Il lavoro è completato quando null rimane un valore vuoto e l’inferenza dello schema produce una colonna INTEGER anziché STRING.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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)
- Lingua principale
- Scala
- Stelle
- 316
- Fork
- 189
- Merge medio
- 4g 21h
- PR unite (30g)
- 162
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/texera
-
ML Scorer validation passes identical non-numeric column types that scikit-learn cannot scoreAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
apache/texera#8756 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/texera#8700 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
apache/texera#8682 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
apache/texera#8300 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/texera
Issue simili
-
Setup dependabotAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
software-mansion/starknet-jvm#631 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
lichess-org/lila#21861 ·
I maintainer di solito rispondono entro 1 giorno
-
bug performance priority:medium regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/datafusion-comet#6313 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
com-lihaoyi/mill#7624 ·
I maintainer di solito rispondono entro 1 giorno