-
Notifications
You must be signed in to change notification settings - Fork 42
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
chore: Send query text when executing query over RPC #2179
Conversation
vrongmeal
commented
Nov 29, 2023
I didn't make many changes to incorporate an |
this is fine in it's current form, getting the operation ID is definitely needed for distributed execution, and I expect that we'll want to pass around an operation context object that will have all of this request-related metadata rather than passing each one in. |
240f4ef
to
ff856da
Compare
crates/sqlexec/src/session.rs
Outdated
plan: LogicalPlan, | ||
query_text: &str, |
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 logicalplan is already a wrapper around the datafusion type, so it could become a tuple of the query-text (or empty string) and the LogicalPlan and that way the function signatures don't need to change.
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.
I tried doing that initially. I can't remember what made me change my mind and do this instead. Anyways, will update!
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.
While trying to do the same, I realised these two combine and disassociate quickly. They are required together here only. Combining them makes the code elsewhere hard to work with. Yes, this function signature feels tacky, but we can fix that.
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.
Updated!
```json { "database_id": "00000000-0000-0000-0000-000000000000", "connection_id": "00000000-0000-0000-0000-000000000000", "query_text": "SELECT * FROM my_pg.public.lineitem WHERE l_shipdate <= DATE '1998-12-01' - INTERVAL '90' LIMIT 5", "telemetry_tag": "unknown", "execution_status": "success", "error_message": null, "elapsed_compute_ns": 11627950, "output_rows": 5, "bytes_read": 15466360, "bytes_written": 0 } ``` Signed-off-by: Vaibhav <[email protected]>
ff856da
to
0c21b66
Compare