Skip to content

Commit c7d59f1

Browse files
Copilotjoocer
andcommitted
Add error handling and documentation for fast JSONL decoder
Co-authored-by: joocer <[email protected]>
1 parent 068b921 commit c7d59f1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

opteryx/utils/file_decoders.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,8 +656,12 @@ def jsonl_decoder(
656656
table = post_read_projector(table, projection)
657657

658658
return num_rows, num_cols, 0, table
659-
except Exception:
659+
except Exception as e:
660660
# Fall back to traditional decoder if fast decoder fails
661+
# This ensures robustness even with unexpected data
662+
import warnings
663+
warnings.warn(f"Fast JSONL decoder failed, falling back to standard decoder: {e}")
664+
pass
661665
pass
662666

663667
parser = simdjson.Parser()

0 commit comments

Comments
 (0)