fix: guard ALP zero-length exponent search, harden Fsst record and fitness-test regex - #316
Merged
Merged
Conversation
…tness-test regex - AlpEncodingEncoder.findExponentsF64/F32 divided by zero when handed a zero-length array (a real case on the Raincloud corpus: SparseEncodingEncoder's cascade can strip every all-zero-bit value from an F64/F32 chunk, e.g. a congestion_surcharge column that is 0.0 for a whole chunk). AlpRdEncodingEncoder already guarded this; mirror it here. - Fsst record (FsstEncodingEncoder) gains content-based equals/hashCode/toString for its array fields, fixing a SonarCloud RELIABILITY finding (java:S6218). - EncodingTableFitnessTest's TABLE_ROW regex uses possessive quantifiers to remove super-linear backtracking risk (java:S8786), with no change to matched input. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
AlpEncodingEncoder.findExponentsF64/findExponentsF32divided by zero when handed a zero-length array — a real case on the Raincloud corpus:SparseEncodingEncoder's cascade can strip every all-zero-bit value from an F64/F32 chunk (e.g. acongestion_surchargecolumn that's0.0for a whole chunk).AlpRdEncodingEncoderalready guarded this; this mirrors it in the plain-ALP encoder.Fsstrecord (FsstEncodingEncoder) gains content-basedequals/hashCode/toStringfor its array fields, resolving a SonarCloud RELIABILITY finding (java:S6218).EncodingTableFitnessTest'sTABLE_ROWregex uses possessive quantifiers to remove super-linear backtracking risk (java:S8786), with no change to matched input.Test plan
./mvnw verify -DskipTests(full reactor compile)./mvnw -pl writer,integration -am test -Dtest="AlpEncodingEncoderTest,EncodingTableFitnessTest,FsstEncodingEncoderTest"@SuppressWarnings("java:S6218")convention elsewhere); kept as-is since the point here is resolving the underlying Sonar finding, not just silencing the annotation🤖 Generated with Claude Code