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

[Enhancement] Ranking window function support pushing down eq predicate #11934

Merged
merged 2 commits into from
Oct 11, 2022

Conversation

liuyehcf
Copy link
Contributor

@liuyehcf liuyehcf commented Oct 8, 2022

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Which issues of this PR fixes :

Fixes #5885

Problem Summary(Required) :

This pr is a continuate work of #5886, #6118, #6119, #6120 and #6411. For the following query, relop can be <=, < and =, <=, < are supported in the previous work, and this pr, we take = into consideration.

select * from (
    select *, rank() over (partition by v2 order by v3) as rk from t0
) sub_t0
where rk relop 5;

Checklist:

  • I have added test cases for my bug fix or my new feature
  • I have added user document for my new feature or new function

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 8, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@wanpengfei-git
Copy link
Collaborator

[FE PR Coverage Check]

😍 pass : 2 / 2 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/sql/optimizer/rule/transformation/PushDownPredicateRankingWindowRule.java 2 2 100.00% []

@wanpengfei-git wanpengfei-git added the Approved Ready to merge label Oct 10, 2022
@StarRocks StarRocks deleted a comment from wanpengfei-git Oct 11, 2022
@liuyehcf liuyehcf merged commit 4fac269 into StarRocks:main Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Rank window function optimization
5 participants