-
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(frontend): get pg_field_descs from boudstatement #950
Conversation
Codecov Report
@@ Coverage Diff @@
## main #950 +/- ##
============================================
+ Coverage 71.52% 71.54% +0.01%
Complexity 2766 2766
============================================
Files 973 973
Lines 57427 57473 +46
Branches 1790 1790
============================================
+ Hits 41076 41119 +43
- Misses 15460 15463 +3
Partials 891 891
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 |
@@ -27,7 +25,7 @@ pub async fn handle_query(context: QueryContext, query: Box<Query>) -> Result<Pg | |||
let mut binder = Binder::new(catalog); | |||
let bound = binder.bind(Statement::Query(query))?; | |||
let plan = Planner::new(Rc::new(RefCell::new(context))) | |||
.plan(bound)? | |||
.plan(bound.clone())? |
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.
Is it possible to pass a ref to bound statement into the planner?
If we have an insert with thousands of values, I suspect this could be slow.
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.
Well, I think it's better to take &BoundStatement
for pg_field_descs
. The planner needs ownership to reduce clones.
Seems the logic of extracting name & type is redundant. Is it possible to just use |
What's changed and what's your intention?
PLEASE DO NOT LEAVE THIS EMPTY !!!
get pg_field_descs from boudstatement to build pg_response
Checklist
Refer to a related PR or issue link (optional)