-
Notifications
You must be signed in to change notification settings - Fork 597
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
refactor(connector): migrate to zero-copy access implementation #17165
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @BugenZhao and the rest of your teammates on Graphite |
6c011d7
to
1ad1b1f
Compare
1ad1b1f
to
d21f36b
Compare
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.
👍
/// Similar to `access`, but may return a borrowed [`DatumCow::Borrowed`] to avoid unnecessary allocation. | ||
/// If not overridden, it will call forward to `access` and always wrap the result in [`DatumCow::Owned`]. | ||
/// | ||
/// This should be preferred over `access` for both callers and implementors. |
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.
The doc comment needs to be fixed. It's mixed together with above.
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.
It is likely due to resolving merge conflicts. Will fix.
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.
Let's bench
@@ -312,7 +308,10 @@ where | |||
Err(create_error())?; | |||
} | |||
|
|||
options.convert_to_datum(value, type_expected) | |||
// TODO: may borrow the value directly |
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.
Will address in #17171.
/// Similar to `access`, but may return a borrowed [`DatumCow::Borrowed`] to avoid unnecessary allocation. | ||
/// If not overridden, it will call forward to `access` and always wrap the result in [`DatumCow::Owned`]. | ||
/// | ||
/// This should be preferred over `access` for both callers and implementors. |
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.
It is likely due to resolving merge conflicts. Will fix.
e80f0eb
to
3c059d5
Compare
d6b28be
to
a05c149
Compare
Signed-off-by: Bugen Zhao <[email protected]>
3c059d5
to
53177c7
Compare
Merge activity
|
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Follow-up of #17153.
access_cow
in all implementors ofAccess
.access_cow
everywhere if possible.access_cow
toaccess
and make it the only method that need/can be implemented in the trait.access
toaccess_owned
to implicitly show the intention of requiring an owned datum in the callsite. Make it an extension trait, so that it cannot be overridden.Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.