Conversation
Contributor
Contributor
|
@ClickHouse/integrations team, please, take a look |
Member
Author
|
PR / Install packages (amd_debug) (pull_request)
The performance test failures are due to |
Avogar
approved these changes
Oct 2, 2025
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.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Implement
QBitdata type that stores vectors in bit-sliced format andL2DistanceTransposedfunction that allows approximate vector search where precision-speed trade-off is controlled by a parameter.Closes: #77088
Documentation entry for user-facing changes
QBit type
The
QBitdata type provides efficient vector storage for approximate similarity search. Under the hood,QBitstores data as a tuple ofFixedStrings. EachFixedStringcolumn stores one bit position from all vector elements. For example:Within each column, each row contains the bits from one vector's elements at that bit position. This allows reading only the most significant bits for faster approximate calculations, or more bits for higher accuracy.
Key features:
Creating QBit
Where:
element_type:BFloat16,Float32, orFloat64dimension: number of elements in each vectorExample:
QBit subcolumns
Access individual bit planes using
.Nsyntax where N is the bit position:BFloat16: 16 subcolumns (.1to.16)Float32: 32 subcolumns (.1to.32)Float64: 64 subcolumns (.1to.64)Vector search functions
L2DistanceTransposed(vector1, vector2, p)- Calculates approximate Euclidean distance between vectorsvector1:QBitvectorvector2:Arrayvectorp: Number of bits to use (1 to element bit-width) - controls precision vs speed. The data will be read up to precisionp, saving I/O.Example: