Repository navigation
Commit b7b610e
fix: Pass plain values to Arrow for list columns (#438)
Fixes cloudquery/cloudquery#23799. @marianogappa looked it over on my
fork first (JeetuSK0808#1) and asked me to open it
here.
`Resource.to_list_of_arr` passes `List.value`, which is a `Vector` of
scalars, straight to pyarrow, so any row with a non-empty list column
raises `ArrowTypeError` and the rest of the table is dropped. A null
list also goes out as `[]`.
- `resource.py`: a list column goes to pyarrow as a plain list of its
items' values, or `None` when it's null.
- `list.py`: an empty list is valid. This is the same line
#423 changes.
The new `tests/schema/test_resource.py` fails on `main` and passes here.
pytest: 88 passed with the fix and 87 on `main`, and the one failure
both times is `test_plugin_package`, which needs Docker. black is clean.
I used Claude Code to find and check this.
Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 60aca91 commit b7b610e
3 files changed
Lines changed: 39 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments