Releases: dfa1/vortex-java
Release list
v0.12.1
Null validity and real-world file compatibility are the two themes of this release. The
Raincloud conformance suite — 247 public datasets written
by the Python vortex-data bindings — exposed a systematic family of silent-corruption bugs where
nullable encoding children's validity masks were dropped during decode, causing null rows to appear
as invented values (0.0, the FoR base, empty string). All five affected encodings are patched:
fastlanes.bitpacked validity-child chain, vortex.dict (eager + layout), vortex.runend,
vortex.sparse (primitive + utf8/binary), vortex.datetimeparts, and fastlanes.alprd.
Real-world files also uncovered scan failures: mixed per-column chunk grids, nested struct layout,
FSST-compressed string-dict offsets, RLE double/float pools, narrow-integer dict pools, all-null
columns, and zone-map stats from the current Rust writer format (vortex.zoned). Unsigned integer
silent-corruption in CSV export and filter predicates is also fixed. The conformance suite itself
ships as a gate-running weekly workflow plus four per-PR JNI interop fixtures.
Fixed
- Per-zone stats from current Rust writers (
vortex.zoned, vortex-jni 0.76.0) decode again. The 0.76 zoned layout replaced the legacyvortex.statsbit-set metadata with an aggregate-function spec list and dropped the per-stat truncation flags; the reader now reconstructs the stats table from that spec list (min/max/sum/null_count), socolumnZoneStatsand aggregate push-down work against those files instead of throwingClassCastException. (#197) - Scans of files whose columns use different chunk grids no longer fail with
mixed per-column chunking beyond 1-vs-N is not supported. The scan planner now splits at the merged boundary grid — the sorted union of every column's chunk boundaries, matching the Rust reference — and decodes each column's covering chunk once, slicing it zero-copy to each window. This handles both nested grids (Raincloudemotions-dataset-for-nlp, wherelabel's coarse chunks nest insidetext's finer grid) and disjoint grids (uci-beijing-multi-site-air-quality, where numeric andstationboundaries do not nest). Aligned N-vs-N and 1-vs-N scans keep their existing slice-free fast path. (#221) - Hardened the
vortex.zonedmetadata decoder against malformed input: an attacker-controlled length varint could overflow itspos + lenbounds checks and crash withNegativeArraySizeException/IndexOutOfBoundsException; the checks are now overflow-safe and unparseable metadata falls back to per-chunk stats. Decimal columns — whose Rust zone table keeps asumfield this reader cannot map — now also fall back instead of decoding a misaligned table. (#197) - CSV export renders nested struct columns as JSON object cells (
{"field":value,...}, strings JSON-escaped, null fields as JSONnull, nested structs recursed) instead of throwingunsupported array type: StructArray. (#217) - Scanning a struct whose columns include a nested struct no longer fails chunk planning. A nested
vortex.structlayout column (e.g. Raincloudcountries-of-the-world'sdatacolumn) is now treated as a single full-range chunk source and decoded through the layout registry's new struct decoder into aStructArray, matching the Rust reference (a nested struct spans its parent's row range, not an independent chunking).schema/count/inspectalready worked; plain scans andselectof sibling columns now work too. CSV export of the struct column itself remains unsupported (a separate rendering limitation). (#207) - CSV export renders unsigned integer columns (U8–U64) with their unsigned values — high-half values previously printed as two's-complement negatives (uci-wine
magnesiumU8 132 exported as -124), silent corruption found by the Raincloud conformance suite. (#208) - Unsigned integer columns are handled unsigned in the remaining consumers: the CLI
filterpredicates (magnesium >= 130now matches its high-half U8 rows instead of silently dropping them — the worst class of the bug: wrong query results), the TUI grid and inspector views, and the Calcite adapter (U8/U16/U32 map to the next wider signed SQL type so their full range fits; U64 staysBIGINTand fails loud rather than surfacing a negative for values ≥ 2^63, both when read and when summed). (#216) fastlanes.rledecodes F64/F32 value pools (LazyRleDoubleArray,LazyRleFloatArray) — files from the Python bindings RLE-encode double columns with long constant runs, which previously failed to scan withunsupported ptype F64. (#209)- Lazy dict decode now covers I8/U8/I16/U16 value columns (
DictByteArray,DictShortArray) — files from the Python bindings dict-encode narrow-integer columns, which previously failed to scan withunsupported ptype for lazy dict. (#206) - CSV export handles all-null (
DType.Null) columns as empty fields instead of throwingunsupported array type: NullArray. (#211) - String-dict columns whose values are FSST-compressed no longer fail to scan with
IndexOutOfBoundsException— the dictionary value offsets are now read at their true ptype width instead of a hardcoded 8-byte stride (uci-magic-gamma-telescope'sclasscolumn decompressed to 4-byte offsets). (#215) - Null rows no longer silently decode as values: wrapper decoders now propagate the row validity that files from the Python bindings carry deep in the encoding tree. Three representations were dropped — a trailing validity child on
fastlanes.bitpacked(reached throughvortex.alp/vortex.zigzag/fastlanes.for, which delegate validity to their encoded child per the RustValidityChildcontract), dict pools with invalid slots, and dict codes with their own validity — across both the eagervortex.dictdecoder and the lazy dict layout path. Found on real data: penguins and kepler exported invented values (32.1,0.0) for thousands of null cells. (#210) vortex.runendpropagates nullable run-values' validity: a null run now nulls every row it covers instead of expanding to a filler value (uci-online-retailcustomeridu16? nulls previously decoded as the FoR base). Row validity is a lazy run-end bool over the same run-ends, matching the RustValidityVTable<RunEnd>. (#225)vortex.sparsepropagates nullability: afill_value: nullarray nulls every unpatched position (world-energy-consumptionbiofuel_cons_change_pctf64? previously decoded them as 0.0), and a null patch value nulls its own position. Row validity is a lazy sparse bool whose fill isfill_value.is_valid()and whose patch bits are the patch values' validity, matching the RustValidityVTable<Sparse>. (#226)vortex.sparseover utf8/binary values now carries the same row validity as the primitive path: afill_value: nullstring column nulls every unpatched position instead of rendering an empty string, and a nullable patch value nulls its own position instead of surfacing its raw bytes. The RustValidityVTable<Sparse>is generic over the values encoding, so VarBin reuses the identical sparse-bool validity — completing the #226 fix for string/binary columns. (#232)vortex.datetimepartspropagates null component rows instead of throwingDateTimeParts: null cell at index: when any part (days/seconds/subseconds) decodes to a null — as a nullablevortex.runendchild now does after #225 — the reassembled timestamp row is null, unblocking scans of bi-yalelanguages and bi-euro2016. (#235)fastlanes.alprdnow propagates left_parts validity: null float rows no longer decode as0.0. (#234)
Added
- Integration test for null-fill Sparse and null-run RunEnd round-trip, running on every gate. (#233)
- Real-world conformance suite against the Raincloud corpus: 247 public datasets whose Vortex files are written by the Python bindings, each validated value-for-value against its Parquet sibling.
scripts/hydrate-raincloud-corpus.shhydrates any subset (cache → mirror → local build),RaincloudConformanceIntegrationTesttests whatever is hydrated against the checked-in per-dataset status matrix, and a weekly workflow runs a size-capped sweep. First triage found four reader gaps on real data, including one silent-corruption bug (unsigned integers rendered as signed). (#205)
v0.12.0
Identity gets types: encoding ids, layout ids, and column names are now validated domain
primitives (EncodingId, LayoutId, ColumnName — sealed WellKnown/Custom shapes with a
total parse, strings only at the wire boundary), layout decode becomes pluggable through
LayoutDecoder/LayoutRegistry, and the reader gains compatibility with current Rust writers'
vortex.zoned zone-map id. Field names are strict on both sides of the file boundary — the
writer refuses what the reference toolchain cannot survive (a NUL-named column SIGABRTs its
Arrow FFI), the reader rejects duplicate/blank/control names loudly instead of corrupting
silently. Plus the dictionary code-scan lane lands in both fused compute kernels (~20×/~22×,
multi-leaf AND ~11×), and Chunk columns are one order-preserving typed map. Every wire-level
claim measured against the Rust (JNI) oracle; behavior divergences documented in
docs/compatibility.md.
Added
Compute.filteredSum(filterColumn, predicate, aggColumn)fuses a filter and a sum into a single scan — a row folds into the total only when the predicate selects it (a null filter row is excluded) and the aggregate value is non-null — with no intermediate selection bitmap. It matches a hand-written fused loop and is ~1.5× faster than the two-passfilter+sum. (57d2225b)Compute.filteredAggregate(chunk, filter, aggColumn)fuses a whole multi-columnRowFilter(an n-aryANDof column-bound predicate leaves) and folds the selected rows'SUM/MIN/MAX/non-null count over an aggregate column in a single pass — the multi-column counterpart offilteredSum, and the row-level kernel behind the Calcite boundary-chunk aggregate push-down. Anullaggregate column counts selected rows only (COUNT(*)). (2ba54888)core.model.ColumnName— the validated column-name domain primitive: non-blank, no control characters (the policy the writer, schema builder, and file parser all enforce —ColumnName.violationis the single source of truth). Field names are now strict on BOTH sides of the file boundary: the writer refuses blank/control names (IllegalArgumentException; NUL additionally crashes the reference toolchain's Arrow FFI), and the reader rejects files carrying them or duplicate field names (VortexException) — wire-legal is a floor, not a policy. Printable names of any shape ($$$$$, interior spaces, emoji) remain legal and round-trip against the reference implementation. (c993a355, dca815b9, d3b5b251)core.model.LayoutId— typed layout identity with the same sealed shape asEncodingId(WellKnownconstants plusCustom; layouts are runtime-pluggable in the reference implementation). The reader now recognizesvortex.zoned, the current canonical zone-map layout id in the Rust reference, alongside the legacyvortex.statsalias it keeps writing — files from current Rust writers scan and prune correctly. (7df3a0db)- Layout decode is pluggable:
LayoutDecoder+LayoutRegistry(reader.layout) mirror the encoding registry —LayoutRegistry.builder().registerDefaults().register(custom).build()passed to the newVortexReader.open(path, readRegistry, layoutRegistry)/VortexHttpReaderoverloads dispatches every layout decode, container children included, through the registry. Programmatic registration only (no service file); unknown layouts fail loudly. Zone-map pruning and filtered scans recognize the built-in layouts only. (fc488d04, dd196f17)
Changed
-
The CLI uber-jar is now fully self-contained for
vortex.zstdfiles: it bundles the FFM binding's nativelibzstdfor all six platforms (osx/linux/windows × x86_64/aarch64) viazstd-platform— previously it shipped the binding's classes but relied on a system libzstd. The library modules keep zstd optional. (1983656b) -
The zstd binding stays a two-artifact opt-in (
io.github.dfa1.zstd:zstd+zstd-platform, bothoptional; no JNI anywhere), and touchingvortex.zstdwithout it now fails with an actionableVortexExceptionnaming the two artifacts to add, instead of a rawNoClassDefFoundError. Default write/read paths never touch the binding (measured). (ae9f95cc) -
The little-endian
ValueLayoutconstants moved fromPTypeIO.LE_*toVortexFormat.LE_*— endianness is a property of the wire format, not of ptypes, andVortexFormatis where format facts live. Six classes that carried private copies (including reversed-name duplicates likeSHORT_LE) now share the single source; nothing outsideVortexFormatdefines awithOrder(LITTLE_ENDIAN)layout. (c060d34f) -
Chunk.columns()returns an order-preservingSequencedMap<ColumnName, Chunk.Column>— one map instead of two parallel string-keyed maps, with each column'sArrayandDTypetraveling together in theColumncarrier.column(String)stays as boundary sugar (plus acolumn(ColumnName)overload); iteration order is the schema/projection order, now guaranteed even for 1–2 column chunks. Typed names originate inScanIteratorfrom the file's already-certified schema. (f8ad15d1) -
Compute.filteredSumover a dictionary-encoded filter column is ~20× faster (best runs ~30×): the predicate is resolved against the dictionary's value pool once and the rawu8codes are scanned directly from their backing segments, instead of decoding every row through the per-element accessor — a fusedSUM(measure) WHERE category = …over 100M rows drops from ~760 ms to ~38 ms. (85e251cc) -
Compute.filteredAggregatetakes the same dictionary code-scan lane (COUNT(*)included) — ~22× faster on the same workload (~980 ms → ~46 ms over 100M rows), which the CalciteWHERE-filtered aggregate push-down inherits on its boundary chunks. (145791c7, 6e6d7dd0) -
A multi-column
ANDfilter no longer forfeits the dictionary lane: the dict-encoded leaf drives the code scan and the remaining predicates are evaluated only on its matches —SUM(…) WHERE category = 7 AND price > 500over 100M rows drops from ~2.3 s to ~200 ms (~11×). (12e13501) -
core.model.EncodingIdis now a sealed interface: the spec constants live in the nestedWellKnownenum (re-exported, soEncodingId.VORTEX_FOOcall sites compile unchanged) andCustomwraps any other wire string, which for the first time lets third-partyEncodingDecoder/EncodingEncoderimplementations declare ids outside the spec set.parseis total over non-blank ids — an unknown id yields a typedCustominstead of an emptyOptional. (ea88a91b) -
reader.decode.ArrayNodeis a single record carrying the typedEncodingId; theKnownArrayNode/UnknownArrayNodesplit and theArrayNode.offactory are gone. Decode dispatch, theallowUnknownpassthrough, and error messages are unchanged. A crafted file with a blank encoding id now fails asVortexExceptioninstead of escaping asIllegalArgumentException. (21810d7e) -
LayoutandZonedStatsSchemamoved to the newreader.layoutpackage, andLayout's misnamedString encodingIdcomponent is nowLayoutId layoutId. Unknown layouts still fail loudly, now with a typed id in the error. (7df3a0db, b08ace79) -
UnknownArray.encodingIdis a typedEncodingIdinstead of a raw string — aCustom, or aWellKnownwhose decoder is not registered. (7588aa31)
v0.11.0
SQL over Vortex grows a compute layer: a Calcite WHERE-filtered SUM/COUNT/MIN/MAX is now answered from the zone-map statistics — folding the chunks the predicate fully selects without decoding them and decoding only the one or two chunks its range cuts through (ADR 0013 §6 / ADR 0018 boundary tier). On a 100-chunk file a SELECT SUM(x) WHERE id BETWEEN … answers ~12× faster than a full scan when the range is wide. Plus the security hardening of the untrusted-input parse paths (ADR 0003) and a vortex.zstd binding bump.
Added
VortexCalcite.connect(schemaName, tables)opens a Calcite JDBC connection with theVortexSchemaregistered in one call, folding away theDriverManager/unwrap/getRootSchema().add(...)boilerplate. It wires the Babel SQL parser, so columns whose names are reserved words (close,open,value,year, …) are queryable unquoted —select close, open from vtx.ohlc— which columnar files routinely need; only the typed-literal keywords (date,time,timestamp,interval) still require back-tick quoting. (24b64b32)- The Calcite aggregate push-down rule now auto-registers over a bare
jdbc:calcite:connection: aVortexTabletranslates to aVortexTableScanwhoseregister()installs the rules when the planner first sees it, soSELECT MIN/MAX/COUNT/SUMover aVortexSchemais answered from zone-map statistics with no caller wiring (previously the rule had to be attached to the planner by hand).AVGjoins them —AggregateReduceFunctionsRulereduces it toSUM/COUNT, both of which push down, so a whole-tableAVGalso decodes no data segment. Column projection andWHEREchunk-skip push-down are unchanged. (24b64b32) - The Calcite aggregate push-down rule now rewrites a whole-table
SUM(col)to a single-rowValuescomputed from the zone-map table (viaVortexTable.zoneSum), soSELECT SUM(col)answers metadata-only with no data segment decoded — joining the existingMIN/MAX/COUNTpush-down.SUMover an all-null (or empty) column answers the SQLNULL, and the rule abandons to a normal scan when a zone carries no usable sum (no zone map, or an overflowed zone). (24b64b32) - A Calcite
WHERE-filteredSUM/COUNT/MIN/MAXis now answered from zone-map statistics when the predicate partitions the chunks cleanly — each chunk wholly matches or wholly fails it — folding only the kept chunks' stats into a scan-free result. A predicate that cuts through a chunk (the typical selective range) still falls back to the zone-map-pruned scan. (32cc4a29) - A
WHERE-filtered aggregate whose range cuts through a chunk no longer falls back to a full scan: the interior chunks still fold from the zone-map stats, and each straddling boundary chunk is decoded on its own and reduced under a row-level filter, soSELECT SUM(volume) WHERE close BETWEEN 100 AND 200decodes only the one or two boundary chunks instead of every surviving chunk. The push-down still abandons to the (correct) scan for an unsigned or floating-point filter column, a non-numericSUM, or a missing zone map. (f89b5b69) VortexReader.decodeChunk(chunkIndex, columns)andchunkCount()decode a single chunk for a chosen subset of columns in isolation, rather than streaming the whole file — the returnedChunkowns its memory and is valid until closed. (084a0133)ScanIterator.columnZoneStats(column)surfaces per-zone min/max/sum/null-count from a column'svortex.statszone-map table without decoding any data segment — the read side of aggregate push-down (ADR 0013 §6).ArrayStatsgains asumcomponent, decoded from the zone-map table (where the Rust reference stores it too), so the Calcite adapter now answersSUM/AVGmetadata-only when every zone carries a sum, falling back to a streaming scan only for columns without a zone map. (05dd9204)
Changed
- Bumped
io.github.dfa1.zstd(thevortex.zstdFFM bindings, pinned by the BOM) 0.3 → 0.6, which ships smaller jars (native debug symbols stripped). (677c2cf7, 6dcdbe94, fec0a0d3) - Bumped Apache Calcite (the SQL adapter's engine) 1.40 → 1.42. (2f9f02c6)
Security
DType-tree and array-node decoding are now depth-capped (64, matching the layout-tree guard): a crafted or self-referential FlatBuffer surfaces as aVortexExceptioninstead of aStackOverflowError— which, being anError, previously escaped sanitization and leaked the reader's memory-mappedArena. (93f8d5f4, 428026d3)- The HTTP reader validates footer
segmentSpecsagainst the file size before anyRangerequest is built from them, matching the local-file path. (1d8ddebc) vortex.zstddecode bounds-checks each frame's declared uncompressed size and overflow-checks the total before allocating, and range-checks VarBin length prefixes — a crafted payload can no longer under-allocate or read out of bounds. (2df4e3a7, adc445e8)- The HTTP reader parses the server-controlled
Content-Rangeheader and slices the tail buffer defensively, so a malformed response yields aVortexExceptionrather than a rawNumberFormatException/IndexOutOfBoundsException. (feac99b7)
v0.10.0
A vortex.zstd overhaul: compression now runs through FFM bindings to the native libzstd, gaining framed (sliceable) payloads, nullable-column support, and shared-dictionary decode. Alongside it, zone-map pruning is fixed to compare in the column's type domain.
Added
DType.isUnsigned()—truefor the unsigned integer primitives (U8–U64),falseotherwise. (#159)- The
vortex.zstdencoder now writes nullable columns (primitive and utf8/binary): null positions are stripped before compression and validity is emitted as a Bool child, matching the Rust reference layout. Whenvortex.zstdis the configured encoder, nullable primitive columns route to it directly instead of being wrapped invortex.masked. new ZstdEncodingEncoder(valuesPerFrame)splits the payload into independently compressed frames ofvaluesPerFramevalues each (oneZstdFrameMetadataper frame), letting a slice scan decompress only the frames overlapping its row range. The no-arg constructor still emits a single frame. (#170)
Changed
- The
vortex.zstdencoding now compresses and decompresses throughio.github.dfa1.zstd:zstd(FFM bindings to the nativelibzstd) instead ofio.airlift:aircompressor-v3. Consumers ofvortex.zstddeclare a single dependency,io.github.dfa1.zstd:zstd-platform, which transitively brings thezstdbinding plus the nativelibzstdfor every supported platform (replacing the former per-platformzstd-native-<platform>artifacts).
Fixed
vortex.zstdsegments compressed with a shared (trained) dictionary now decode, via the nativelibzstddictionary support, instead of being rejected. The upstreamzstd.vortexcompatibility fixture is read end-to-end and matches the Rust reference. (#104)- Writing a nullable
Utf8/Binarycolumn no longer throwsNullPointerException(or silently drops nulls): nullable string columns now carry their validity like nullable primitives and round-trip throughvortex.masked. As a result they decode asMaskedArray(validity + values child) rather than a bareVarBinArray. (#168) - CSV export now handles nullable columns (
MaskedArray): null rows export as an empty field instead of failing with "unsupported array type for CSV export". (#168) - Zone-map pruning now compares filter values in the column's type domain rather than by the boxed value's type. A predicate whose value is boxed at a different width (e.g.
Integeron anI64column) — or any value on aU64column — previously pruned nothing and silently degraded to a full scan; it now prunes correctly (unsigned columns by unsigned order). As part of this, a filter value genuinely incomparable to its column (e.g. aStringagainst a numeric column) now raisesVortexExceptionduring the scan instead of silently disabling pruning — a behaviour change for callers that relied on the previous silent full scan. (#159)
v0.9.0
Two import-only breaking changes — the vortex-core types moved under io.github.dfa1.vortex.core.*, and the no-arg DType factories became constants. In return, Vortex now ships with no FlatBuffers or Protobuf runtime dependency: the .fbs/.proto schemas compile in-house to MemorySegment-native Java, dropping com.google.flatbuffers:flatbuffers-java — the last automatic-module dependency — so a named JPMS module-info is viable, and the generated wire classes are prefixed so they no longer collide on your classpath (ADR 0017).
Added
- Canonical non-nullable
DTypeconstants:DType.I8…I64,U8…U64,F16/F32/F64, plusBOOL,UTF8,BINARY,NULL,VARIANT; build a nullable column withDType.I64.asNullable(). (f4b22e42)
Changed
- Breaking (imports): every
vortex-coretype moved underio.github.dfa1.vortex.core.*—core.model(DType,PType,TimeUnit,EncodingId,ExtensionId,Time*Dtype),core.io(IoBounds,PTypeIO,VortexFormat),core.error(VortexException),core.compute(FastLanes,PrimitiveArrays),core.fbs/core.proto(wire codecs). E.g.io.github.dfa1.vortex.core.DType→io.github.dfa1.vortex.core.model.DType. (52f30c16) - Dropped the
com.google.flatbuffers:flatbuffers-javaruntime dependency; the.fbs/.protoschemas compile in-house toMemorySegment-native Java, and the generated wire classes are prefixedFbs*/Proto*so the generic names (Array,Buffer,DType, …) no longer collide on your classpath (ADR 0017). (5907302e)
Removed
- Breaking (imports): the no-arg
DTypefactories (DType.i64(),DType.utf8(), …) — use the constants above (DType.i64()→DType.I64).DType.decimal(..)/DType.structBuilder()and the record constructors are unchanged. (f4b22e42)
v0.8.3
A Sonar-driven refactoring release: no new file-format capability, but a focused pass using SonarCloud findings to drive cleanups — dead code removed, duplication factored out, and one hot-loop micro-optimisation. Each finding was triaged (lead, not verdict) so the changes preserve behaviour and the JIT vectorisation of the hot decode loops. The interpretation framework behind this is now documented in docs/testing.md.
Performance
FastLanes.transposeIndex/iterateIndex: replaced the per-element%//+ORDER[]indirection with permutation tables built once in a static initialiser. Faster address generation keeps more outstanding scatter misses in flight; measured 1.4×–3.4× on the transpose/undelta kernels (Apple M5, L1→DRAM working sets). The per-element decode loops stay specialised per width to preserve C2 superword vectorisation. (089b6e36, e683a634)
Removed
- Breaking (read SPI): removed
EncodingDecoder.accepts(DType). It was a residual of the ADR-0001 read/write split — encode-selection semantics copied onto the decoder side, where the reader dispatches purely byEncodingIdand never called it (dead since the split).EncodingEncoder.acceptsis unchanged. Downstream customEncodingDecoderimplementations should delete theiracceptsoverride. (7516a544)
Changed
- Internal dedup driven by Sonar duplication findings: extracted the shared FastLanes layout +
PType.bitsandPrimitiveArrays.toLongs/fromLongsinto core, hoisted theMaterialized*array boilerplate into a shared base, factored the fourBitpackedEncodingDecoderunpack loops onto one precomputed per-row schedule, addedPType.isUnsigned(dropping three private copies), and deduplicated the CLI inspect plumbing andformatBytes. (ec6b9631, a74263c0, 7af0af2a, 8362a353, 87c77cc9, d8f84088, b557e573, d52e8c0c) - Dropped dead
PTypeswitch arms in the writer'sreadPrimitiveElement,primitiveArrayLen, andbuildTypedUniqueArray— unreachable branches flagged as uncovered. (4c6ab149, 94d2fa49, f89072a6)
Fixed
- Cleared two SonarCloud-reported bugs in the writer's SUM zone-map stat plumbing. (33798ab9)
- Suppressed
java:S1172onAbstractMaterializedArray.materializewith a reason — thearenaparameter is contractual (implementsArray#materialize(SegmentAllocator)for the leaf classes), not a removable unused parameter. (9b226f73)
Tests
- Filled coverage gaps surfaced by Sonar: the
Materialized*materializedefaults, everySchemaCommand.formatDTypearm, and the writer's global-dict cardinality fallback with U16 utf8 codes. (8741dad3, 77fad504, c2918eaa)
Docs
docs/testing.md: new section on reading Sonar/PIT as data — the uncovered-line triage (missing-test / dead-code / defensive-by-contract), why mutation testing splits what coverage cannot, and when duplication is the deliberate price of the hot-loop rule. (8999661b)
v0.8.2
The headline is writer-side zone-map statistics: the writer now emits vortex.stats (zoned) layouts carrying per-chunk MIN/MAX, NULL_COUNT, and SUM — matching the Rust reference — so zone-map chunk pruning and aggregate push-down work on Java-written files (previously the reader could decode these stats but the writer never produced them). The release also continues the test-hardening track: the lowest-covered encoder/decoder paths are filled in, SonarCloud new-code coverage is back to 100% with the quality gate green (overall ~83%, all ratings A, zero bugs/vulnerabilities), and the build toolchain is refreshed across eight dependency bumps.
Added
- Writer:
vortex.stats(zoned) layout emission, toggled byWriteOptions.enableZoneMaps. Each column is wrapped with a per-zone (one zone per chunk) statistics table; the stat set follows the Rust reference exactly. (838dba82, f2d74351) - Writer: per-zone MIN/MAX for primitive columns including F16, extension columns (over their storage primitive), Utf8 columns (full string bounds), and dictionary-encoded columns (computed on the logical values, independent of the dict encoding). (838dba82, fb5d096a, 38ab5c51, c1198253, e51da936)
- Writer: per-zone NULL_COUNT for every column type. (135c9b37, c52d4b83, ab233b86)
- Writer: per-zone SUM for numeric primitive columns (signed →
i64, unsigned →u64, float →f64; integer overflow records a null sum). Matches Rust, which sums numeric primitives and decimals but not Utf8/extension columns. (9661f554) - Reader:
RowFilter.isNull/RowFilter.isNotNullpredicates with zone-map chunk pruning — IS NULL skips chunks with zero nulls, IS NOT NULL skips all-null chunks — via the per-chunknull_count. (2749b6ca) - Reader:
columnStats()aggregatesnull_countacross a column's chunks (reported only when every chunk carries one). (cb844f23)
Changed
- Reader: the shared default
HttpClientbehindVortexHttpReader.open(URI, ReadRegistry)is now a package-private non-final field used purely as a unit-test seam, so the default-client overload is driven to a normal return by a mocked client instead of a live network call. Production never reassigns it. (12e46270)
Tests
- Coverage for the ten lowest-coverage encode/decode classes —
ZigZagEncodingDecoder/Encoder,SequenceEncodingEncoder,VariantEncodingDecoder.dtypeFromProto(every proto→coreDTypearm),TimeExtensionEncoder,VarBinViewEncodingDecoder,VarBinEncodingDecoder,AlpEncodingDecoder,DateTimePartsEncodingDecoder, andDeltaEncodingDecoder— exercising guards, broadcast/constant paths, and ptype arms. (a3012d4a, c9386eda, 6c9682b8, bbb9d669, 7742ecd3) - Writer: property-based and mutation-driven round-trips for the Delta and AlpRd encoders. (d3d245a6)
- Reader: HTTP fixtures bumped to
v0.75.0with a smoke test across all encodings; theopen(URI, ReadRegistry)overload is now covered via the default-client seam. (8a1b5db2, 12e46270) - Reader: decoder tests allocate via
Arena.ofAuto()instead of the never-freedArena.global(). (59ec2e2a)
Build
- Dependency refresh:
jacoco-maven-plugin0.8.13→0.8.15,pitest-maven1.20.0→1.25.5,checkstyle13.5.0→13.6.0,byte-buddy-agent1.17.7→1.18.10,central-publishing-maven-plugin0.10.0→0.11.0,maven-jar-plugin3.4.1→3.5.0,maven-dependency-plugin3.7.0→3.11.0, andactions/checkout6→7. (dab876b7, 7b7c3580, 46659a73, 46a30be1, c6723832, 3e5fa349, c943f81b, af009116)
v0.8.1
A hardening release: no new file-format capability, but a large step up in verification rigour. Mutation testing (PIT) now guards the security-critical bounds/parse paths in core, reader, and writer at 99–100% kill rate; the build fails on any javac warning (-Xlint:all -Werror); and property-based round-trips exercise every lossless encoding plus the full cascade-selection pipeline against seeded-random inputs. The one functional addition is boxed-nullable array input on the map writeChunk path.
Added
- Writer: the map-based
writeChunkpath accepts boxed nullable arrays (Integer[],Long[],Double[], …) alongside primitive arrays, so columns with nulls can be written without manual validity bookkeeping. (4d18939a)
Changed
- Breaking —
ExtensionEncoder.encodeAllis now abstract. The default body threwVortexException; every implementation already overrides it, so the contract now fails at compile time rather than at runtime. (2dcd69ce) - Breaking —
Estimateis now an enum{ SKIP, ALWAYS_USE, COMPLETE }. The sealed interface with emptySkip/AlwaysUserecords, theskip()/alwaysUse()factories, and thenull"no verdict" sentinel are gone;COMPLETEis the explicit defer-to-sample-encode verdict. (c355a4bf) - Reader cleanups: dropped a dead
length < 0blob check and a redundantoffset > fileSizebounds clause, reused the sharedPTypeIOlittle-endian layouts, and removed redundant numeric casts flagged by static analysis. (5d5fcc45, 36328285, 04cab707)
Fixed
- Writer: I8/I16 columns are excluded from the global dictionary — the reader cannot decode a narrow-int dict, so dict-encoding them produced unreadable files. (473256b1)
- Writer:
WriteRegistrynow iterates encoders in a deterministic order andaccepts()reports honestly, fixing a non-deterministic encoder selection that broke the Windows build. (9c4ebb18) - Reader: Pco decode now guards
preDeltaNagainst int overflow before clamping — the subtraction is widened tolong, restoring the overflow-safe path. (b7346e7c)
Build
- Zero-warning rule:
-Xlint:all -Werroracross all modules. Theclassfilelint (which only flags missing annotation class files inside third-party Arrow bytecode) is scoped off in the two Arrow-using modules only. (dab467e5, 43f6f840) - Mutation testing (PIT): opt-in
pitestprofiles in core, reader, and writer, scoped to the bounds/parse classes (IoBounds,PTypeIO,WriteRegistry,ChunkImpl, …), with common config hoisted into the parent POM. (46904b24, ed8c98a1, 1200c76b, 840cc46a) - SonarCloud: generated
fbs/andproto/sources excluded from analysis (machine output, not hand-maintained); the deliberate per-width SIMD-loop duplication is documented in ADR 0005 rather than refactored away. Code smells dropped 857→394; coverage ~81%, all ratings A, zero bugs/vulnerabilities. (6c591293)
Tests
- Property-based lossless round-trips added for ALP (f32/f64), Delta/FoR/ZigZag/AlpRd, a bitpacked bit-width sweep, the full
CascadingCompressor(every codec × cascade depth 0–3), and a Pco seeded-random distribution sweep. (dbe44aaa, a2cf3443, aede11d7, 115dd6fd, a426c1de) - Mutation-driven test hardening lifted core/reader/writer bounds and registry classes to 99–100% kill rate. (2235499a, c9243f9a, 912fcaff)
- Integration: added Java↔Rust round-trips for
vortex.patched,fastlanes.delta, andmaskedencodings. (13702764) - CLI: terminal smoke tests now force class initialization so the FFM libc/kernel32 symbol resolution is actually exercised. (3f741ef7)
v0.8.0
Read and write Vortex Variant (semi-structured, JSON-shaped) columns from Java. Internally, transform encodings now decode lazily, trimming per-decode allocation. This release also hardens the reader's bounds handling on untrusted input (ADR 0003 Phase E), fixes CSV-import memory blow-ups on large files, and lifts test coverage to 80% with all Sonar ratings at A.
Added
- Writer:
vortex.variantencoder. Encodes a variant column as the canonicalvortex.variantcontainer overcore_storage— an all-equal column becomes a singlevortex.constant, a row-varying column avortex.chunkedof per-run constants — with an optional row-aligned typedshreddedchild recorded inVariantMetadata.shredded_dtype. Input isVariantData(List<Scalar>)with.constant(n, v)/.shredded(...)factories. Java↔Rust (JNI) round-trip verified for constant, row-varying, and shredded columns. Scalar values only — arbitrary nested objects needvortex.parquet.variant(deferred, ADR 0014). (35da529d, e4e44980, 4566dca0) - Reader: variant columns now decode Java-side.
ConstantEncodingDecoderandChunkedEncodingDecoderhandleDType.Variant(materialising the inner-typed array);VariantEncodingDecoderwraps the result asVariantArray, exposingcoreStorage()andshredded(). (76e4c741, 4566dca0)
Security
- Reader bounds hardening (ADR 0003 Phase E): untrusted offsets/lengths from file metadata now flow through a typed
IoBoundshelper that throwsVortexExceptioninstead of a rawIndexOutOfBoundsException, and hand-rolled index guards were replaced withObjects.checkIndex. A crafted flat-segment file can no longer trip an unchecked array access during decode. (e9af80d6, 3bcd9881, a5ce8380)
Fixed
- CSV import: large files no longer OOM. The importer now streams rows in a single pass (buffering only the first chunk for schema inference) and disables the global-dictionary pass by default, which previously accumulated every distinct value in memory. (d5280ae2, 0b6784b5, 62863616)
- CLI:
IoWorker.runAndAwaitdecremented its in-flight counter after signaling completion, so a caller readingpending()right after it returned could still see the task counted; the counter is now decremented before the await returns. Theview/tuicommands also close the openedVortexHandleon every error path (openOnWorkerreturnsOptional). (95c06b1a, 27446d81) - Reader:
BoolArray.materializemasked the accumulator byte before the bit-set OR, removing a sign-promotion footgun in the packed-bitmap write. (bc8e9d4e)
Changed
- Decode shape: transform encodings now decode lazy-only. The eager
Materialized*Arrayfallbacks were removed fromvortex.zigzag(all PTypes + broadcast, cd59fefa),fastlanes.for(all integer PTypes, d7953e1f),vortex.alp(broadcast-without-patches, deab8067),vortex.constant(Decimal →LazyConstantDecimalArray, a6a9611e),vortex.runend(Bool →LazyRunEndBoolArray, 0bbcb81f),vortex.sparse(Bool →LazySparseBoolArray, db2e955b), andfastlanes.rle(validity →OffsetBoolArray, empty →LazyConstantXxxArray, 5e83a5c3). Decompression encodings (bitpacked,pco,zstd,fsst,delta,patched), the primitive base, thevortex.dictencoding-level path, and thevortex.alppatches path stay Materialized by design. See ADR 0015. - Breaking — sealed
Arraypermits changed.DecimalArrayis now anon-sealedfamily interface (decimal arrays moved fromimplements Arraytoimplements DecimalArray), so decimal joins the per-dtype family layer. Downstream exhaustiveswitchoverArraymust add acase DecimalArray. (a6a9611e) - Breaking —
ArrayAPI.Array.truncate(rows)renamed toArray.limited(rows)and made an abstract operation implemented by every array (composites slice their children); raw-segment access moved off theArraySegmentsutility ontoArray.materialize(SegmentAllocator)andArray.segmentIfPresent(). (87ab65e2, 4d9ac1f8, 332b067e, 32a35e03) - CSV import reports progress every 10K rows instead of per-chunk. (07a056e7)
Removed
- Breaking —
EmptyArrayremoved from the sealedArraypermits. It was never emitted by the reader (empties are zero-length typed arrays in their own family) and broke the dtype→family invariant (EmptyArray(I64)was not aLongArray). Represent an empty column as a zero-length array of the appropriate family. (3a4dcdfa)
Documentation
- ADR 0016: captures
vortex-arrowbridge interop options (separate module / Arrow C-Data / none); deferred until a concrete downstream need. (a6126f29)
Tests
- Test coverage raised from ~74% to 80% — the lazy/chunked/dict/run-end/sparse array families,
ChunkImpl, and several decoders (DecimalEncodingDecoder,DictEncodingDecoder,ParquetImporter) reached full line + branch coverage. SonarCloud quality gate green: reliability, security, and maintainability all at A, zero bugs and vulnerabilities.
v0.7.3
Parquet ZSTD support, vortex.patched encoder, constant-encoding selection fix, Windows TUI raw-mode fix.
Added
- Parquet: ZSTD-compressed Parquet import —
zstd-jniwas an optional dep in hardwood and had to be declared explicitly. NYC Yellow Taxi 2024-01 (47.6 MB Parquet, 2.96 M rows × 19 cols) imports to 40.7 MB Vortex — 14% smaller than the Rust JNI reference (47 MB) thanks to the global-dict encoder catching low-cardinalityF64columns. - Writer:
vortex.patchedencoder — identifies outlier values that exceed the optimal bit width, zeros them in the inner array (exposed as an open cascade child for further bitpacking), and stores their within-chunk U16 indices and raw values separately.
Fixed
- CLI: Windows TUI raw-mode —
readKeynow callsReadFiledirectly on the kernel handle obtained viaGetStdHandleinstead of reading fromSystem.in. Java'sSystem.ingoes through JVM-internal CRT wrappers that ignoreSetConsoleMode, so every keypress previously required Enter before the TUI reacted. - Writer: constant encoding skipped for single-distinct-value columns —
isDictCandidatereturnedtruefordistinctCount == 1, routing all-same-value columns through the global-dict path instead ofvortex.constant.
Changed
- CLI: polling loop in
Terminal.readKey(Duration)extracted toKeyDecoder.nextWithTimeout(InputStream, Duration)— eliminates duplication betweenPosixTerminalandWindowsTerminal.
Tests
- Integration:
TaxiParquetOracleVsJavaIntegrationTest— hardwood reads the taxi Parquet to a CSV (oracle);ParquetImporter→CsvExporterproduces a second CSV (SUT); line-by-line diff must be zero. Proves the importer loses no data across 2.96 M rows × 19 columns.
Full changelog: https://github.com/dfa1/vortex-java/blob/main/CHANGELOG.md#0.7.3