NVIDIA / NVIDIA/cudf

[BUG] JSON reader fails to parse files with empty rows

Open
#5,712 12 comments 0 reactions 0 assignees View on GitHub
0 - Backlog bug cuIO libcudf Python Spark
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

The following test fails in both cases:
```
@pytest.mark.parametrize(
"buffer",
[
"[ ]\n[ ]",
'{ }\n{ }',
],
)
def test_json_empty(buffer):
cu_df = cudf.read_json(buffer, lines=True)
pd_df = pd.read_json(buffer, lines=True)

np.testing.assert_array_equal(pd_df.dtypes, cu_df.dtypes)
```
With array rows, the reader creates a table with int8 column instead of an empty table.
With object rows, a CUDA error happens.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.