Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#8,674 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
scala

Research direction

Start at JSONUtils.JSONToMap and inspect the value-node handling for JSON null. Run JSONUtilsSpec, including its two assertions for null, and verify the JSONL File Scan reproduction with {"a":1} and {"a":null}. Done means null remains an empty value and schema inference produces an INTEGER column rather than STRING.

Written by the indexing model from the issue text.

Description

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)
Dominant language
Scala
Stars
316
Forks
189
Avg merge
4d 21h
Merged PRs (30d)
162

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/texera

All issues in apache/texera

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.