From cad26dc60237ddaf509cd40ff4a8ca516532bbdd Mon Sep 17 00:00:00 2001 From: joocer Date: Fri, 20 Dec 2024 16:35:43 +0000 Subject: [PATCH] #2132 --- opteryx/utils/file_decoders.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/opteryx/utils/file_decoders.py b/opteryx/utils/file_decoders.py index 43249014..58656bda 100644 --- a/opteryx/utils/file_decoders.py +++ b/opteryx/utils/file_decoders.py @@ -326,12 +326,10 @@ def jsonl_decoder( if not isinstance(buffer, bytes): buffer = buffer.read() - parser = simdjson.Parser() - for line in buffer.split(b"\n"): if not line: continue - dict_line = parser.parse(line) + dict_line = simdjson.Parser().parse(line) rows.append( {k: orjson.dumps(v) if isinstance(v, dict) else v for k, v in dict_line.items()} )