-
Notifications
You must be signed in to change notification settings - Fork 600
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(relational_iter): add state_table_iter with pk_prefix and pk_bounds #3008
Conversation
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.
license-eye has totally checked 824 files.
Valid | Invalid | Ignored | Fixed |
---|---|---|---|
822 | 1 | 1 | 0 |
Click to see the invalid file list
- src/frontend/test_runner/tests/gen/testcases.rs
Codecov Report
@@ Coverage Diff @@
## main #3008 +/- ##
==========================================
+ Coverage 73.26% 73.40% +0.14%
==========================================
Files 731 731
Lines 98441 99012 +571
==========================================
+ Hits 72124 72682 +558
- Misses 26317 26330 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
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.
btw, how to represent a prefix scan? e.g., pk=[a,b], scan a=1
…into wcy_prefix_iter
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.
Generally LGTM
let start_key_with_prefix = self.keyspace.prefixed_key(&key_bytes); | ||
let cell_based_bounds = ( | ||
Included(start_key_with_prefix.clone()), | ||
Included(next_key(start_key_with_prefix.as_slice())), |
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.
next key should be excluded?
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.
Yes, indeed my fault. Thanks for your correcting and will be fixed in later PR.
What's changed and what's your intention?
This PR adds
with_prefix
andwith_pk_bounds
forStateTableIter
, the former can be used while refactoring join with relational table.For example, a table with pk
(a, b)
(1, 1)
(1, 2)
(2, 1)
(2, 2)
(3, 1)
(3, 2)
iter(a = 2) will scan
(2, 1), (2, 2)
, iter(a > 2) will scan(2, 1), (2, 2), (3, 1), (3, 2)
.Checklist
./risedev check
(or alias,./risedev c
)Refer to a related PR or issue link (optional)
close #2811