Skip to content

Commit 0676d90

Browse files
dfa1claude
andcommitted
fix: use VortexException for missing validity child in MaskedArray
IOOBE signals programmer bugs; missing validity child when AllValid was encoded is a file-data inconsistency — callers must distinguish. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 845058e commit 0676d90

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

core/src/main/java/io/github/dfa1/vortex/core/array/MaskedArray.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.github.dfa1.vortex.core.array;
22

33
import io.github.dfa1.vortex.core.DType;
4+
import io.github.dfa1.vortex.core.VortexException;
45

56
import java.lang.foreign.MemorySegment;
67

@@ -47,7 +48,7 @@ public Array child(int i) {
4748
case 0 -> child;
4849
case 1 -> {
4950
if (validity == null) {
50-
throw new IndexOutOfBoundsException("no validity child (AllValid)");
51+
throw new VortexException("no validity child: masked array was encoded as AllValid");
5152
}
5253
yield validity;
5354
}

0 commit comments

Comments
 (0)