feat(index): add RaBitQ encoder and multibit-aware scorer contract - #19318
Open
chrevanthreddy wants to merge 3 commits into
Open
feat(index): add RaBitQ encoder and multibit-aware scorer contract#19318chrevanthreddy wants to merge 3 commits into
chrevanthreddy wants to merge 3 commits into
Conversation
Collaborator
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.
Describe the issue this Pull Request addresses
Resolves #19098 (umbrella: #19094, RFC-109)
Third slice of RFC-109 (Hudi Native Vector Index): the RaBitQ encoder and metric-aware scorer contract with multibit-aware support.
Summary and Changelog
RaBitQEncoder: 1-bit and multibit (extended-plane) encoding contract, residual and non-residual encoding, L2/IP query-state preparation, and packed-binary/multibit dot-term scoring primitives. Encoding-version-aware so readers dispatch on the metadata written per generation.VectorQuantizer: quantized-vector container (QuantizedVector) and quantizer contract shared by encoder and posting builders.MetricQueryState: metric-aware query rotation/normalization state; enforces metric compatibility explicitly.RaBitQPlaneKernel/VectorQueryPlanes: bit-plane scoring kernel (Long.bitCount-based inner products) and query-plane representation.RaBitQByteLutScorer: byte-LUT scorer for multibit codes.RaBitQNeutralFactors/RaBitQFactorConfig: neutral/rescale factor computation and configuration.TestRaBitQEncoder(20),MetricEstimatorIdentityTest(14),TestVectorDistanceMetric(9),TestRaBitQNeutralFactors(6),TestMetricQueryStateRotation(5),TestRaBitQPlaneKernel(3),TestRaBitQResidualHypothesis(1),TestRaBitQResidualRecall(1).Impact
Additive: new engine-neutral encoder/scorer classes under
hudi-common. No wiring into existing write/read paths in this PR (that happens in the bootstrap #19099 and read-path #19100 slices). No behavioral change to existing tables.Risk Level
low
Pure additive numeric/encoding logic with dedicated unit coverage; nothing references these classes from existing runtime paths yet.
Documentation Update
Encoder/scorer contracts and the multibit decomposition are documented as class/method Javadoc. User-facing RFC document tracked in #19309.
Contributor's checklist