Commit d3a4af4
refactor: widen SessionContext.read_batches to accept any iterable
The underlying PyArrow FFI extractor for `Vec<RecordBatch>` requires a
Python `list`, so the previous `list[pa.RecordBatch]` annotation was
accurate but unnecessarily strict. Accept any
`Iterable[pa.RecordBatch]` on the Python side and materialize to a
list before crossing the FFI boundary so callers can pass generators,
tuples, or other iterables without manual conversion.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 90705a6 commit d3a4af4
2 files changed
Lines changed: 25 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
981 | 981 | | |
982 | 982 | | |
983 | 983 | | |
984 | | - | |
| 984 | + | |
985 | 985 | | |
986 | 986 | | |
987 | | - | |
988 | | - | |
989 | | - | |
990 | | - | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
991 | 993 | | |
992 | 994 | | |
993 | 995 | | |
| |||
998 | 1000 | | |
999 | 1001 | | |
1000 | 1002 | | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
1001 | 1008 | | |
1002 | | - | |
| 1009 | + | |
1003 | 1010 | | |
1004 | 1011 | | |
1005 | 1012 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
920 | 920 | | |
921 | 921 | | |
922 | 922 | | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
923 | 934 | | |
924 | 935 | | |
925 | 936 | | |
| |||
0 commit comments