Repository navigation
Remove dead code and duplicated helpers - #591
Merged
Merged
Conversation
dfa1
force-pushed
the
chore/remove-dead-code
branch
from
October 22, 2026 20:19
bd0aed4 to
e541ed0
Compare
Found by method-level reference counts plus PMD CPD. No behavior change. Dead or test-only code: - ZonedStatsSchema.zoneLength: no caller; the scan finds legacy vortex.stats zones by physical chunk (ScanIterator#zoneStarts). - TimestampExtensionDecoder.zonedDateTime: only tests called it; it was just instant(...).atZone(timezone(ext).orElse(UTC)). - StatsOptions.distinctAndTop: only tests called it; they now keep a local ALL_STATS built with the withXxx methods. - LeBitReader.bitsConsumed: only tests called it; they now check the position by reading the next bits. - Ansi.CLEAR_LINE_RIGHT: never referenced. Duplicated code: - SparseEncodingDecoder.scalarToLong copied ConstantEncodingDecoder.scalarToRawBits. - ChunkImpl.adaptUtf8/adaptBinary now share adaptVarBin. - InspectorRender reuses GridRender.formatPrimitive and bytesToHex. - CsvExporter.jsonValue drops its copied list cases and falls back to cellValue; a new List[List[I64]] test covers this path. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
dfa1
force-pushed
the
chore/remove-dead-code
branch
from
October 22, 2026 20:25
5ba5ffa to
3f683b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cleanup from an audit for dead and duplicated code (method-level reference counts plus PMD CPD). No behavior change.
Dead or test-only code
ZonedStatsSchema.zoneLength(MemorySegment): no caller. The scan finds legacyvortex.statszones by physical chunk (ScanIterator#zoneStarts). Its 3 tests go with it.TimestampExtensionDecoder.zonedDateTime: only tests called it. It wasinstant(...).atZone(timezone(ext).orElse(UTC))over two public methods.timezone()already has its own tests.StatsOptions.distinctAndTop(): only tests called it. The 3 writer tests now keep a localALL_STATSbuilt with thewithXxxmethods.LeBitReader.bitsConsumed()(package-private class): only tests called it. Those tests now check the position by reading the next bits.Ansi.CLEAR_LINE_RIGHT: never referenced.Duplicated code
SparseEncodingDecoder.scalarToLongwas a copy ofConstantEncodingDecoder.scalarToRawBits. Sparse now calls the Constant one.ChunkImpl.adaptUtf8/adaptBinarynow shareadaptVarBinfor the null check and validity bitmap.InspectorRenderreusesGridRender.formatPrimitiveandbytesToHexinstead of its own copies. Strings, bytes and decimals still render the way each view did before.jsonValuedrops its three copied list cases. It already fell back tocellValue, which renders lists the same way. A newList[List[I64]]test covers this path, which no test reached before.Left as is: the per-type copies in
BitpackedEncodingDecoderand the FSST fast/tail loops are deliberate hot-loop specialization.Testing:
./mvnw verify -pl reader,writer,cli,csv -am -DskipITspasses (unit tests and javadoc). No interop cross-check test added: nothing read or written changes.🤖 Generated with Claude Code