-
Notifications
You must be signed in to change notification settings - Fork 526
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(batch): Use futures-async-stream to implement insert executor #2002
Conversation
Signed-off-by: d2lark <lichengamoy@gmail.com>
Signed-off-by: d2lark <lichengamoy@gmail.com>
bors try |
🔒 Permission denied Existing reviewers: click here to make D2Lark a reviewer |
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.
Rest LGTM. Thanks for the PR!
src/batch/src/executor2/insert.rs
Outdated
impl InsertExecutor2 { | ||
#[try_stream(boxed, ok = DataChunk, error = RwError)] | ||
async fn do_execute(mut self: Box<Self>) { | ||
if !self.executed { |
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.
This field is no longer necessary since do_execute
takes the ownership of this executor.
insert.next().await?; | ||
insert.close().await?; | ||
let mut stream = insert.execute(); | ||
let _ = stream.next().await.unwrap(); |
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.
This seems to return a Result
. We may throw the error by ?
here.
Signed-off-by: d2lark <lichengamoy@gmail.com>
Signed-off-by: d2lark <lichengamoy@gmail.com>
Signed-off-by: d2lark <lichengamoy@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #2002 +/- ##
=======================================
Coverage 70.79% 70.80%
=======================================
Files 628 628
Lines 80785 80734 -51
=======================================
- Hits 57193 57161 -32
+ Misses 23592 23573 -19
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.
LGTM
Please resolve conflict first. |
bors try |
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!
tryTimed out. |
What's changed and what's your intention?
Implement Insert using Executor2 trait.
Please explain IN DETAIL what the changes are in this PR and why they are needed:
Checklist
Refer to a related PR or issue link (optional)
close #1937