-
Notifications
You must be signed in to change notification settings - Fork 350
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
perf: evolve promql execution engine #5691
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
This reverts commit db58884.
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
867dace
to
93f589d
Compare
Signed-off-by: Ruihang Xia <[email protected]>
93f589d
to
38ffd3a
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.
Good job!
} | ||
|
||
if let Some(merge_scan) = plan.as_any().downcast_ref::<MergeScanExec>() | ||
&& let Some(distribution) = distribution_requirement.as_ref() |
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.
Looks like we can take the distribution_requirement
and avoid the below clone
ExecutionMode::Bounded, | ||
); | ||
|
||
let eq_properties = if let LogicalPlan::Sort(sort) = &plan |
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.
Could you add some commments to explain what's happening here.
@@ -375,11 +392,34 @@ impl SeriesDivideStream { | |||
let current_value = current_string_array.value(0); | |||
let last_value = last_string_array.value(last_row); | |||
if current_value != last_value { | |||
return Ok(Some((resumed_batch_index, 0))); | |||
return Ok(Some((resumed_batch_index - 1, last_batch.num_rows() - 1))); |
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.
Do we have test cases for the changes in this file?
@@ -376,7 +376,7 @@ impl PromPlanner { | |||
|
|||
let group_sort_expr = new_group_exprs | |||
.into_iter() | |||
.map(|expr| expr.sort(true, false)); | |||
.map(|expr| expr.sort(false, false)); |
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.
Why do we change this to DESC? It changes topk/bottomk output order.
| 1970-01-01T00:00:05 | 7.0 | | ||
| 1970-01-01T00:00:10 | 11.0 | | ||
| 1970-01-01T00:00:15 | 15.0 | | ||
| 1970-01-01T00:00:00 | NaN | |
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 the result correct?
++ | ||
++ |
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.
Do we need to fix this?
| 5 | host2 | idc1 | 1970-01-01T00:00:10 | | ||
| 4 | host2 | idc1 | 1970-01-01T00:00:05 | | ||
| 3 | host3 | idc2 | 1970-01-01T00:00:00 | |
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.
Should we sort results by time asc?
@@ -129,7 +129,7 @@ etcd-client = "0.14" | |||
fst = "0.4.7" | |||
futures = "0.3" | |||
futures-util = "0.3" | |||
greptime-proto = { git = "https://github.com/GreptimeTeam/greptime-proto.git", rev = "c5419bbd20cb42e568ec325a4d71a3c94cc327e1" } | |||
greptime-proto = { git = "https://github.com/GreptimeTeam/greptime-proto.git", rev = "f01d022451be031bcfb00c414939ecbf059e80ea" } |
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.
Wait for GreptimeTeam/greptime-proto#223
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia [email protected]I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
100x performance improvement and 40x memory reduction by eliminating all potential sorts, and parallelizing as much as possible.
PR Checklist
Please convert it to a draft if some of the following conditions are not met.