Add QBit data type examples for Node and Web clients#781
Draft
Copilot wants to merge 2 commits into
Draft
Conversation
|
|
Copilot
AI
changed the title
[WIP] Verify QBit data type with JSON formats
Add QBit data type examples for Node and Web clients
May 29, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Adds usage examples for the
QBitdata type introduced in ClickHouse 25.10. Verified that QBit columns round-trip cleanly through JSON formats despite the underlyingTuple(FixedString(N), ...)bit-plane layout — the server transparently serializes/parses them as the originalArray(<element_type>), so no client-side workaround is needed for normal insert/select.The only place users encounter non-UTF-8 bytes is when explicitly selecting a bit-plane subcolumn (
vec.N); the example documents this and shows thehex()workaround.examples/{node,web}/coding/qbit.ts— create aQBit(Float32, 8)column, insert/select vectors viaJSONEachRow, run an approximate search withL2DistanceTransposed, and demonstratehex(vec.N)for raw bit-plane subcolumns. Setsallow_experimental_qbit_type=1(required on 25.10, no-op on 26.x where QBit is GA).examples/README.md— new row in thecoding/table linking both files.Checklist
Changelog
coding/qbit.tsfor both Node and Web clients, demonstrating insert/select andL2DistanceTransposedsearch onQBit(...)columns via JSON formats, plus thehex()workaround for FixedString bit-plane subcolumns.