Repository navigation
Commit 8ff4b4a
authored
fix(python): preserve nullability when converting a chunked array with nulls (#10283)
## What
Converting a `pyarrow.ChunkedArray` whose chunks contain nulls raised an
error,
even though `ChunkedArray` is a documented input and the same data
converts fine
as a single `pyarrow.Array` or a `pyarrow.Table`.
## Fix
The chunked branch hardcoded non-nullable when encoding each chunk and
when
building the dtype, unlike the single-array branch which derives
nullability.
Derive one nullability for the whole chunked array — so every chunk
shares a
dtype — and use it for both.
## AI assistance
Prepared with AI assistance; I have reviewed and verified the change.
---------
Signed-off-by: jackylee-ch <[email protected]>1 parent 2cc04c4 commit 8ff4b4a
2 files changed
Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
48 | 57 | | |
49 | 58 | | |
50 | | - | |
| 59 | + | |
51 | 60 | | |
52 | 61 | | |
53 | 62 | | |
| |||
56 | 65 | | |
57 | 66 | | |
58 | 67 | | |
59 | | - | |
| 68 | + | |
60 | 69 | | |
61 | 70 | | |
62 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
| |||
0 commit comments