Repository navigation
Commit 3cc1a5f
authored
fix: write empty nested list streams with structural layouts (#10533)
## Summary
Writing `list<list<int32>>` rows containing only empty or null outer
lists fails with `ListLayoutStrategy needs at least one chunk` when
structural list layouts are enabled. This reproduces in PyVortex 0.86.1
and 0.88.0 with `VORTEX_EXPERIMENTAL_LIST_LAYOUT=1`.
## Changes
Handle an empty list stream before spawning child writers by returning
the same typed zero-row chunked layout used by the flat writer. Pass the
first chunk explicitly into the nonempty transposition path, preserving
its sequence ID, bounded streaming, and existing layout behavior.
Add file write/read regression cases for empty lists, nullable empty
lists, all-null lists, and mixed empty/null rows. Replace the old
empty-stream rejection test with nullable/nonnullable dtype and
row-count checks.
## Validation
- All four new file-roundtrip cases fail on unmodified `develop`
(`18aebea`) with the reported error.
- After the fix, 76 selected tests pass, including all four regression
cases and both empty-stream nullability cases:
```sh
cargo nextest run --locked -p vortex-file -p vortex-layout -E
'test(nested_) | test(writer_empty_chunks) |
test(layouts::list::writer::tests)'
```
- Formatted both changed files with CI's pinned `nightly-2026-09-10`
rustfmt; `git diff --check` passes.
Implemented with OpenAI Codex assistance.
Signed-off-by: Daniel King <dan@spiraldb.com>1 parent ced05c2 commit 3cc1a5f
2 files changed
Lines changed: 60 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2037 | 2037 | | |
2038 | 2038 | | |
2039 | 2039 | | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
2040 | 2064 | | |
2041 | 2065 | | |
2042 | 2066 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
120 | | - | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
| |||
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
132 | 148 | | |
133 | 149 | | |
134 | 150 | | |
| |||
153 | 169 | | |
154 | 170 | | |
155 | 171 | | |
| 172 | + | |
156 | 173 | | |
157 | 174 | | |
158 | 175 | | |
| |||
214 | 231 | | |
215 | 232 | | |
216 | 233 | | |
| 234 | + | |
217 | 235 | | |
218 | 236 | | |
219 | 237 | | |
220 | | - | |
| 238 | + | |
| 239 | + | |
221 | 240 | | |
222 | 241 | | |
223 | 242 | | |
| |||
226 | 245 | | |
227 | 246 | | |
228 | 247 | | |
229 | | - | |
230 | | - | |
| 248 | + | |
| 249 | + | |
231 | 250 | | |
232 | | - | |
233 | 251 | | |
234 | 252 | | |
235 | 253 | | |
| |||
264 | 282 | | |
265 | 283 | | |
266 | 284 | | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | 285 | | |
271 | 286 | | |
272 | 287 | | |
| |||
326 | 341 | | |
327 | 342 | | |
328 | 343 | | |
| 344 | + | |
329 | 345 | | |
330 | 346 | | |
331 | 347 | | |
| |||
440 | 456 | | |
441 | 457 | | |
442 | 458 | | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
443 | 462 | | |
444 | | - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
445 | 466 | | |
446 | 467 | | |
447 | 468 | | |
448 | | - | |
| 469 | + | |
449 | 470 | | |
450 | 471 | | |
451 | | - | |
| 472 | + | |
452 | 473 | | |
453 | 474 | | |
454 | 475 | | |
455 | 476 | | |
456 | 477 | | |
457 | 478 | | |
458 | 479 | | |
459 | | - | |
460 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
461 | 484 | | |
462 | 485 | | |
463 | 486 | | |
| |||
0 commit comments