feat(inverted_index.format): add writer#2900
Merged
zhongzc merged 3 commits intoGreptimeTeam:developfrom Dec 11, 2023
Merged
Conversation
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
b7cdde4 to
a6c792e
Compare
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #2900 +/- ##
===========================================
- Coverage 85.00% 84.53% -0.48%
===========================================
Files 753 756 +3
Lines 118597 119511 +914
===========================================
+ Hits 100818 101025 +207
- Misses 17779 18486 +707 |
waynexia
approved these changes
Dec 11, 2023
killme2008
approved these changes
Dec 11, 2023
| //! An inverted index comprises a collection of bitmaps, a null bitmap, and a finite state transducer (FST) indicating tag values' positions: | ||
| //! | ||
| //! `bitmap₀ bitmap₁ bitmap₂ ... bitmapₙ null_bitmap fst` | ||
| //! `null_bitmap bitmap₀ bitmap₁ bitmap₂ ... bitmapₙ fst` |
Member
There was a problem hiding this comment.
Looks like we move forward the null_bitmap before bitmaps, can you explain why?
Collaborator
Author
There was a problem hiding this comment.
- For Read, bitmap reading relies on offset and size. Whether
null_bitmapcomes first or not does not affect the format and will not destroy the implementation. - For Write, some implementations of index building may directly use
BTreeMap<Option<Bytes>, BitVec>>. In this case, it is more natural to writenull_bitmapfirst. (Of course, this is not the case in my implementation, but I'm happy to handle nulls first)
evenyag
approved these changes
Dec 11, 2023
Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
7 tasks
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.
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
Add format writer, accepts stream of values.
Checklist
Refer to a related PR or issue link (optional)
#2705