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

add new sql test "partition by combined with rank" #772

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Wangch29
Copy link
Contributor

While working on project 3, I discovered that my implementation of window_function was incorrect, but it still passed all the tests including p3.20-window-function. After investigating, I found that this was due to the absence of a test case combining the PARTITION BY clause with a RANK query.

Specifically, when PARTITION BY and RANK are used together, ranking should be done within each partitioned group. However, my incorrect implementation performed ranking without considering the partitions. Despite this, it still passed all the current tests in p3.20-window-function. To address this, I have added a new test case that ensures the proper behavior when PARTITION BY and RANK are used together.

Although the combination of PARTITION BY and RANK appears in the p3.leaderboard-q1-window.slt tests, these leaderboard tests are optional. Therefore, if someone does not attempt the leaderboard tests, they might not notice similar issues in their implementation, as I did.

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.

1 participant