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: pushdown aggr, limit and sort plan #2495

Merged
merged 12 commits into from
Sep 28, 2023

Conversation

waynexia
Copy link
Member

@waynexia waynexia commented Sep 26, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Push down Sort, Limit and Aggr plan under some conditions.

As most intermediate stages are computed in datanode, the logical plan in frontend is very simple. I'm finding a way to make it more detailed

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@waynexia waynexia changed the title [wip] optimize query feat: pushdown aggr, limit and sort plan Sep 27, 2023
@waynexia waynexia marked this pull request as ready for review September 27, 2023 13:49
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #2495 (8a490e2) into develop (e352fb4) will decrease coverage by 0.32%.
Report is 6 commits behind head on develop.
The diff coverage is 83.87%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2495      +/-   ##
===========================================
- Coverage    85.25%   84.94%   -0.32%     
===========================================
  Files          729      729              
  Lines       115862   115957      +95     
===========================================
- Hits         98780    98498     -282     
- Misses       17082    17459     +377     

src/query/src/dist_plan/analyzer.rs Outdated Show resolved Hide resolved
Co-authored-by: Yingwen <realevenyag@gmail.com>
Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

LGTM

@waynexia waynexia added this pull request to the merge queue Sep 28, 2023
Merged via the queue into GreptimeTeam:develop with commit 10ecc30 Sep 28, 2023
13 checks passed
@waynexia waynexia deleted the opt-query-att-1 branch September 28, 2023 06:51
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* check partition for aggr plan

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* handle empty partition rule

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* remove CheckPartition option

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* add test

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* update some valid sqlness result

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* opt-out promql plan and update sqlness

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix limit

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix insert select subquery

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* update unit test result

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix typo

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* Update src/query/src/dist_plan/analyzer.rs

Co-authored-by: Yingwen <realevenyag@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Co-authored-by: Yingwen <realevenyag@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants