Summary
VarBinArray.ChunkedMode.of throws VortexException: chunk is not a VarBinArray: NullArray when one chunk of a chunked Utf8/Binary column is entirely null and decodes to NullArray rather than a VarBinArray. Same family as the already-fixed #246/#211/#247 (NullArray not recognized as a valid all-null representation across the codebase) but this call site was missed.
Root cause
VarBinArray.java (ChunkedMode.of, ~line 458-466) unwraps MaskedArray before checking the chunk type, but has no NullArray arm:
Array data = c instanceof MaskedArray m ? m.inner() : c;
if (data instanceof ChunkedMode nested) {
...
} else if (data instanceof VarBinArray vb) {
typed.add(vb);
} else {
throw new VortexException("VarBinArray.ChunkedMode: chunk is not a VarBinArray: "
+ data.getClass().getSimpleName());
}
An all-null chunk (e.g. vortex.constant with a null scalar, or a bare vortex.null encoding) decodes to NullArray, which falls into the else and throws.
Repro
Discovered via the Raincloud conformance corpus (#205): mnist has a chunked Utf8/Binary column with an all-null chunk.
io.github.dfa1.vortex.core.error.VortexException: VarBinArray.ChunkedMode: chunk is not a VarBinArray: NullArray
at io.github.dfa1.vortex.reader.array.VarBinArray$ChunkedMode.of(VarBinArray.java:466)
at io.github.dfa1.vortex.reader.layout.ChunkedLayoutDecoder.decodeChunkedLayout(ChunkedLayoutDecoder.java:132)
Expected
ChunkedMode.of should treat a NullArray chunk as an all-null run of the expected row count (same treatment as other NullArray call sites fixed in #246/#211/#247), not throw.
Summary
VarBinArray.ChunkedMode.ofthrowsVortexException: chunk is not a VarBinArray: NullArraywhen one chunk of a chunked Utf8/Binary column is entirely null and decodes toNullArrayrather than aVarBinArray. Same family as the already-fixed #246/#211/#247 (NullArray not recognized as a valid all-null representation across the codebase) but this call site was missed.Root cause
VarBinArray.java(ChunkedMode.of, ~line 458-466) unwrapsMaskedArraybefore checking the chunk type, but has noNullArrayarm:An all-null chunk (e.g.
vortex.constantwith a null scalar, or a barevortex.nullencoding) decodes toNullArray, which falls into theelseand throws.Repro
Discovered via the Raincloud conformance corpus (#205):
mnisthas a chunked Utf8/Binary column with an all-null chunk.Expected
ChunkedMode.ofshould treat aNullArraychunk as an all-null run of the expected row count (same treatment as other NullArray call sites fixed in #246/#211/#247), not throw.