Skip to content
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(frontend): add execution context to replace session impl #714

Merged
merged 2 commits into from
Mar 7, 2022

Conversation

BowenXiao1999
Copy link
Contributor

@BowenXiao1999 BowenXiao1999 commented Mar 7, 2022

What's changed and what's your intention?

Motivation: #700

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

Comment on lines 19 to 21
pub struct ExecutionContext<'a> {
pub session: &'a SessionImpl,
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use Rc or Arc here, so the lifetime.


mod create_source;
pub mod create_table;
pub mod drop_table;
mod explain;

pub(super) async fn handle(session: &SessionImpl, stmt: Statement) -> Result<PgResponse> {
let context = ExecutionContext::new(session);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not mut now cuz rust clippy do not allow it. Change in need.

Copy link
Member

@fuyufjh fuyufjh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #714 (fbe5414) into main (171c105) will decrease coverage by 0.22%.
The diff coverage is 87.50%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #714      +/-   ##
============================================
- Coverage     71.77%   71.55%   -0.23%     
  Complexity     2706     2706              
============================================
  Files           899      901       +2     
  Lines         51737    52034     +297     
  Branches       1751     1781      +30     
============================================
+ Hits          37135    37232      +97     
- Misses        13787    13987     +200     
  Partials        815      815              
Flag Coverage Δ
java 58.86% <ø> (-0.72%) ⬇️
rust 77.04% <87.50%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
rust/frontend/src/handler/explain.rs 0.00% <0.00%> (ø)
rust/frontend/tests/plan_test_runner.rs 73.77% <83.33%> (+1.84%) ⬆️
rust/frontend/src/handler/create_source.rs 97.82% <100.00%> (+0.04%) ⬆️
rust/frontend/src/handler/create_table.rs 97.36% <100.00%> (-0.36%) ⬇️
rust/frontend/src/handler/drop_table.rs 95.23% <100.00%> (+0.23%) ⬆️
rust/frontend/src/handler/mod.rs 90.90% <100.00%> (+0.90%) ⬆️
rust/frontend/src/session.rs 98.46% <100.00%> (+0.02%) ⬆️
rust/frontend/src/binder/expr/mod.rs 65.95% <0.00%> (-11.83%) ⬇️
rust/frontend/src/binder/select.rs 92.85% <0.00%> (-7.15%) ⬇️
rust/common/src/vector_op/substr.rs 84.61% <0.00%> (-5.13%) ⬇️
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 171c105...fbe5414. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants