-
Notifications
You must be signed in to change notification settings - Fork 44
[Draft] feat(btree): Intro b-tree global index and add tests for java compatibility. #212
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
Open
ChaomingZhangCN
wants to merge
34
commits into
alibaba:main
Choose a base branch
from
ChaomingZhangCN:btree-global-index
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
3b9e47d
feat: btree global index
ChaomingZhangCN ba22e7a
feat: btree global index
ChaomingZhangCN 8602449
types
ChaomingZhangCN 8ff03de
Merge remote-tracking branch 'chaoming/main' into btree-global-index
ChaomingZhangCN f70a4ce
Merge remote-tracking branch 'github/main' into btree-global-index
ChaomingZhangCN fb4015f
feat: implement btree global index writer and fix compilation errors
ChaomingZhangCN 93b0485
Merge remote-tracking branch 'github/main' into btree-global-index
ChaomingZhangCN 5f4bbf8
Merge remote-tracking branch 'github/main' into btree-global-index
ChaomingZhangCN fd24bef
feat: implement B-tree global index compatibility
ChaomingZhangCN e371a1a
fix: correct binary format for BIGINT/TINYINT/SMALLINT to little-endian
ChaomingZhangCN b7e1305
fix: 修复 cpplint 错误 - 使用 C 风格字符串常量
ChaomingZhangCN f70bcdf
style: 使用 clang-format 修复代码格式
ChaomingZhangCN 5f1981f
cpplint
ChaomingZhangCN caafcca
fix: resolve compiler warnings and errors in btree global index
ChaomingZhangCN e790dad
fix
ChaomingZhangCN e0cbd1d
Merge github/main into btree-global-index
ChaomingZhangCN 8cdbc7f
Fix merge: keep SortLookupStoreFooter API, add CacheManager parameter
ChaomingZhangCN b42cb19
Fix CacheManager constructor call in btree_global_indexer.cpp
ChaomingZhangCN dd3d379
Merge main branch and add BTree Index configuration options
ChaomingZhangCN 38a2b8b
Add trailing newlines to source files
ChaomingZhangCN 858b068
Fix formatting in btree_index_meta_test.cpp
ChaomingZhangCN 78f9bcc
fix: mark CacheValue constructor as explicit to prevent implicit conv…
ChaomingZhangCN e45da4c
fix: fix clang-tidy warnings and memory safety issues
ChaomingZhangCN 7c87891
chore: add btree compatibility test data to Git LFS
ChaomingZhangCN 96e6669
Merge branch 'main' into btree-global-index
ChaomingZhangCN b895910
address
ChaomingZhangCN cf5b585
Merge remote-tracking branch 'github/main' into btree-global-index
ChaomingZhangCN ff169c9
address
ChaomingZhangCN 1f72308
fix
ChaomingZhangCN 5709dc5
address
ChaomingZhangCN 3b79a01
address
ChaomingZhangCN b83bfc6
minor fix
ChaomingZhangCN 9462bf5
minor fix
ChaomingZhangCN ca9f594
address
ChaomingZhangCN File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,4 +98,44 @@ Result<std::shared_ptr<FileIndexResult>> FileIndexReader::VisitNotIn( | |
| } | ||
| return file_index_result; | ||
| } | ||
|
|
||
| Result<std::shared_ptr<FileIndexResult>> FileIndexReader::VisitAnd( | ||
| const std::vector<Result<std::shared_ptr<FileIndexResult>>>& children) { | ||
| if (children.empty()) { | ||
| return Status::Invalid("VisitAnd called with no children"); | ||
| } | ||
|
|
||
| // Start with the first child | ||
| PAIMON_RETURN_NOT_OK(children[0]); | ||
| auto current = children[0].value(); | ||
|
|
||
| // AND with remaining children | ||
| for (size_t i = 1; i < children.size(); ++i) { | ||
| PAIMON_RETURN_NOT_OK(children[i]); | ||
| auto child = children[i].value(); | ||
| PAIMON_ASSIGN_OR_RAISE(current, current->And(child)); | ||
| } | ||
|
|
||
| return current; | ||
| } | ||
|
|
||
| Result<std::shared_ptr<FileIndexResult>> FileIndexReader::VisitOr( | ||
| const std::vector<Result<std::shared_ptr<FileIndexResult>>>& children) { | ||
| if (children.empty()) { | ||
| return Status::Invalid("VisitOr called with no children"); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using |
||
| } | ||
|
|
||
| // Start with the first child | ||
| PAIMON_RETURN_NOT_OK(children[0]); | ||
| auto current = children[0].value(); | ||
|
|
||
| // OR with remaining children | ||
| for (size_t i = 1; i < children.size(); ++i) { | ||
| PAIMON_RETURN_NOT_OK(children[i]); | ||
| auto child = children[i].value(); | ||
| PAIMON_ASSIGN_OR_RAISE(current, current->Or(child)); | ||
| } | ||
|
|
||
| return current; | ||
| } | ||
| } // namespace paimon | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
I'm wondering if
VisitBetweenis strictly necessary, sincePredicateBuilder::Betweenis achieved byANDofGreaterOrEqualandLessOrEqual. AndVisitAndandVisitOrfor FileIndexReader is only used forBetween?