-
Notifications
You must be signed in to change notification settings - Fork 3.8k
MSQ window functions: Fix partition boundary issues for arrays #16780
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
Merged
cryptoe
merged 5 commits into
apache:master
from
Akshat-Jain:msq-wf-fix-array-partition-boundaries
Jul 24, 2024
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
55279a1
MSQ window functions: Fix partition boundary issues for arrays
Akshat-Jain 6fcc802
Address review comments
Akshat-Jain d602f50
Cache type strategies
Akshat-Jain ff91346
Trigger Build
Akshat-Jain 722e25b
Convert typeStrategies from list to array
Akshat-Jain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
.../test/resources/drill/window/queries/druid_queries/partition_by_array/wikipedia_query_1.e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| Austria null #de.wikipedia 1 | ||
| Republic of Korea null #en.wikipedia 2 | ||
| Republic of Korea null #ja.wikipedia 3 | ||
| Republic of Korea null #ko.wikipedia 4 | ||
| Republic of Korea Seoul #ko.wikipedia 1 | ||
| Austria Vienna #de.wikipedia 1 | ||
| Austria Vienna #es.wikipedia 2 | ||
| Austria Vienna #tr.wikipedia 3 | ||
| Republic of Korea Jeonju #ko.wikipedia 4 | ||
| Republic of Korea Suwon-si #ko.wikipedia 1 | ||
| Austria Horsching #de.wikipedia 1 | ||
| Republic of Korea Seongnam-si #ko.wikipedia 1 | ||
| Republic of Korea Yongsan-dong #ko.wikipedia 1 |
6 changes: 6 additions & 0 deletions
6
.../test/resources/drill/window/queries/druid_queries/partition_by_array/wikipedia_query_1.q
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| select | ||
| countryName, cityName, channel, | ||
| row_number() over (partition by array[1,2,length(cityName)] order by countryName) as c | ||
| from wikipedia | ||
| where countryName in ('Austria', 'Republic of Korea') | ||
| group by countryName, cityName, channel | ||
13 changes: 13 additions & 0 deletions
13
.../test/resources/drill/window/queries/druid_queries/partition_by_array/wikipedia_query_2.e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| Austria null #de.wikipedia 1 | ||
| Austria Horsching #de.wikipedia 2 | ||
| Austria Vienna #de.wikipedia 3 | ||
| Austria Vienna #es.wikipedia 4 | ||
| Austria Vienna #tr.wikipedia 5 | ||
| Republic of Korea null #en.wikipedia 6 | ||
| Republic of Korea null #ja.wikipedia 7 | ||
| Republic of Korea null #ko.wikipedia 8 | ||
| Republic of Korea Jeonju #ko.wikipedia 9 | ||
| Republic of Korea Seongnam-si #ko.wikipedia 10 | ||
| Republic of Korea Seoul #ko.wikipedia 11 | ||
| Republic of Korea Suwon-si #ko.wikipedia 12 | ||
| Republic of Korea Yongsan-dong #ko.wikipedia 13 |
6 changes: 6 additions & 0 deletions
6
.../test/resources/drill/window/queries/druid_queries/partition_by_array/wikipedia_query_2.q
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| select | ||
| countryName, cityName, channel, | ||
| row_number() over (partition by array[1,2,3] order by countryName) as c | ||
| from wikipedia | ||
| where countryName in ('Austria', 'Republic of Korea') | ||
| group by countryName, cityName, channel | ||
|
Akshat-Jain marked this conversation as resolved.
|
||
13 changes: 13 additions & 0 deletions
13
.../test/resources/drill/window/queries/druid_queries/partition_by_array/wikipedia_query_3.e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| Austria null #de.wikipedia 1 | ||
| Austria Vienna #de.wikipedia 1 | ||
| Austria Vienna #es.wikipedia 2 | ||
| Austria Vienna #tr.wikipedia 3 | ||
| Austria Horsching #de.wikipedia 1 | ||
| Republic of Korea null #en.wikipedia 1 | ||
| Republic of Korea null #ja.wikipedia 2 | ||
| Republic of Korea null #ko.wikipedia 3 | ||
| Republic of Korea Seoul #ko.wikipedia 1 | ||
| Republic of Korea Jeonju #ko.wikipedia 1 | ||
| Republic of Korea Suwon-si #ko.wikipedia 1 | ||
| Republic of Korea Seongnam-si #ko.wikipedia 1 | ||
| Republic of Korea Yongsan-dong #ko.wikipedia 1 |
6 changes: 6 additions & 0 deletions
6
.../test/resources/drill/window/queries/druid_queries/partition_by_array/wikipedia_query_3.q
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| select | ||
| countryName, cityName, channel, | ||
| row_number() over (partition by array[1,length(countryName),length(cityName)] order by countryName) as c | ||
| from wikipedia | ||
| where countryName in ('Austria', 'Republic of Korea') | ||
| group by countryName, cityName, channel |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.