Commit cb27492
committed
buildEmptyBatch: fix List/Map children → child (singular)
assembleListVector in arrow-js was crashing with
'TypeError: undefined is not an object (evaluating data.children[0].slice)'
when serializing zero-row batches whose schema included list columns.
Root cause: makeData's overloads for List and Map take `child` (singular)
— see arrow-js/src/data.ts visitList/visitMap — but we were passing
`children: [childData]` (plural array). Arrow-JS ignored the unknown
property and constructed the Data with an empty children array,
producing a List Data with no values sub-array. TypeScript didn't catch
this because the call was suffixed with `as any`, bypassing property-
shape validation entirely.
FixedSizeList was already correct (child singular). List and Map were
wrong. Passing `child: childData` for both lets IPC serialize 0-row
batches with list/map columns through httpDispatchStreamInit's token
batch path.
Also bumps echo/all_types past the list column cases on HTTP; struct/
map/union cases still surface a separate state-token issue to chase.1 parent 589a95f commit cb27492
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
146 | 151 | | |
147 | | - | |
| 152 | + | |
148 | 153 | | |
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
152 | 157 | | |
153 | 158 | | |
| 159 | + | |
154 | 160 | | |
155 | 161 | | |
156 | 162 | | |
157 | 163 | | |
158 | | - | |
| 164 | + | |
159 | 165 | | |
160 | 166 | | |
161 | 167 | | |
| |||
0 commit comments