Commit 4d18939
feat(writer): accept boxed nullable arrays on the map writeChunk path
The map entry point writeChunk(Map) only accepted raw primitive arrays, so a
nullable column had to be supplied via the builder (writeChunk(c -> c.put(...,
new Long[]{...}))). Passing a boxed Long[]/Integer[]/… through the map threw
"unsupported data type". The two entry points now share ChunkImpl.validateAndAdapt:
- writeChunk(Map) adapts every column up front (boxed nullable array → NullableData,
raw arrays pass through) before the row-count check and encoding, so the map form
routes nullable columns through MaskedEncoding exactly like the builder.
- validateAndAdapt is now package-private and idempotent: an already-adapted
NullableData passes through, since the builder pre-adapts before delegating to
writeChunk(Map) (would otherwise double-adapt and reject NullableData).
Tests: VortexWriterTest gains map-path accept (boxed Long[] with null) + reject
(boxed on non-nullable) cases; the integration masked round-trip now drives the
map form, verifying null preservation end-to-end through the JNI reader.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 1370276 commit 4d18939
4 files changed
Lines changed: 75 additions & 9 deletions
File tree
- integration/src/test/java/io/github/dfa1/vortex/integration
- writer/src
- main/java/io/github/dfa1/vortex/writer
- test/java/io/github/dfa1/vortex/writer
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1031 | 1031 | | |
1032 | 1032 | | |
1033 | 1033 | | |
1034 | | - | |
1035 | | - | |
| 1034 | + | |
| 1035 | + | |
1036 | 1036 | | |
1037 | 1037 | | |
1038 | 1038 | | |
| |||
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
46 | 56 | | |
47 | 57 | | |
48 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
49 | 64 | | |
50 | 65 | | |
51 | 66 | | |
| |||
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
372 | 376 | | |
373 | 377 | | |
374 | 378 | | |
375 | 379 | | |
376 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
377 | 395 | | |
378 | 396 | | |
379 | 397 | | |
| |||
382 | 400 | | |
383 | 401 | | |
384 | 402 | | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
| 403 | + | |
390 | 404 | | |
391 | 405 | | |
392 | 406 | | |
| |||
400 | 414 | | |
401 | 415 | | |
402 | 416 | | |
403 | | - | |
| 417 | + | |
404 | 418 | | |
405 | 419 | | |
406 | 420 | | |
| |||
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
88 | 125 | | |
89 | 126 | | |
90 | 127 | | |
| |||
0 commit comments