Commit 3a4dcdf
refactor(reader)!: drop dead EmptyArray, enforce dtype→family invariant
EmptyArray was never constructed in production — empties are represented
as zero-length typed arrays in their own family (LazyConstant*, Materialized*
len 0). It only occupied a slot in sealed Array's permits, adding a dead case
to exhaustive switches, and broke the dtype→family invariant (EmptyArray(I64)
is not a LongArray, so `case LongArray` consumers would miss it).
Remove the type and its permit. The lone user — a universal stub decoder in
VortexReaderTest — now returns a zero-length UnknownArray.
BREAKING CHANGE: EmptyArray removed from the sealed Array permits.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent fda2398 commit 3a4dcdf
3 files changed
Lines changed: 6 additions & 26 deletions
File tree
- reader/src
- main/java/io/github/dfa1/vortex/reader/array
- test/java/io/github/dfa1/vortex/reader
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
0 commit comments