Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

JSONL File Scan reads a JSON null as the text "null"

Aperta Adatta ai principianti
#8,674 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

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

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?
  1. Upload a JSONL file with these two lines:
    {"a":1}
    {"a":null}
    
  2. Add a JSONL File Scan that reads it and run the workflow.
  3. Column a is inferred as STRING, and the two rows hold the text "1" and the text "null". Expected: INTEGER, with 1 and 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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/texera

Tutte le issue di apache/texera

Issue simili

Altre issue su Scala

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.