-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement merge reader #225
Conversation
63f536a
to
d3b425d
Compare
d3b425d
to
220688f
Compare
Now the ChunkReaderImpl use MergeReader as default reader. Also add more tests to MergeReader.
66483b8
to
4b6f56d
Compare
Ports the doc comments from kudu to merge.rs to describe the idea of the merge algorithm we used.
4b6f56d
to
ff5b9f6
Compare
Codecov Report
@@ Coverage Diff @@
## develop #225 +/- ##
===========================================
+ Coverage 82.97% 83.32% +0.34%
===========================================
Files 274 275 +1
Lines 22099 22580 +481
===========================================
+ Hits 18336 18814 +478
- Misses 3763 3766 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Panics if number of columns in batch is not equal to `BatchBuilder`'s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* feat: Check columns when constructing Batch * feat: Merge reader skeleton * test: Add tests for MergeReader * feat: Use get_ref to compare row * feat: Implement MergeReader * test: Add more tests * feat: Use MergeReader to implement ChunkReader Now the ChunkReaderImpl use MergeReader as default reader. Also add more tests to MergeReader. * docs: Describe the merge algo in merge.rs Ports the doc comments from kudu to merge.rs to describe the idea of the merge algorithm we used. * test: Fix unit tests * chore: Address CR comments Panics if number of columns in batch is not equal to `BatchBuilder`'s * chore: Address CR comments * chore: Implement Debug and add test for Node
Changes
This PR implements the
MergeReader
which supports sort and merge rows from multiple source readers/iterators by the row key, timestamp, sequence and op_typeMergeReader
implementation are ported from kudu's MergeIterator and CeresDB's MergeIteratorMergeReader
could be constructed via theMergeReaderBuilder
compare_row_of_batch()
toStoreSchema
to compare key and internal columns between two rowsBatchBuilder
to buildBatch
from parts of anotherBatch
, based on prior works in feat: Adds push_value_ref and extend_slice_of to MutableVector #215ChunkReaderImpl
used to useConcatReader
now is changed to useMergeReader
to combine inputsRelated Issues