[BUG] JSON reader fails to parse files with empty rows
Open
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
Assessment
This issue has not been assessed yet.