-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Adding support of MAP_TOP_N for Presto #18698
Merged
Merged
Conversation
This file contains 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
jainavi17
force-pushed
the
map_top_n_keys_by_value
branch
from
November 17, 2022 13:08
5614ea2
to
5773716
Compare
kaikalur
requested changes
Nov 17, 2022
presto-main/src/main/java/com/facebook/presto/operator/scalar/sql/MapSqlFunctions.java
Outdated
Show resolved
Hide resolved
jainavi17
force-pushed
the
map_top_n_keys_by_value
branch
from
November 17, 2022 23:03
079fa55
to
563f69d
Compare
I say just do MAP_TOP_N which returns a (sub-)map and then people can do map_keys/map_values on that if needed. |
kaikalur
requested changes
Dec 9, 2022
...in/src/test/java/com/facebook/presto/operator/scalar/sql/TestMapTopNKeysByValueFunction.java
Outdated
Show resolved
Hide resolved
jainavi17
force-pushed
the
map_top_n_keys_by_value
branch
2 times, most recently
from
December 10, 2022 08:35
8715c8b
to
97e615a
Compare
jainavi17
changed the title
Adding support of MAP_TOP_N_KEYS_BY_VALUE for Presto
Adding support of MAP_TOP_N for Presto
Dec 12, 2022
jainavi17
force-pushed
the
map_top_n_keys_by_value
branch
from
December 13, 2022 07:41
af1b8ed
to
648d1d3
Compare
kaikalur
approved these changes
Dec 14, 2022
rewriting the function to return top n map entries by value
jainavi17
force-pushed
the
map_top_n_keys_by_value
branch
from
December 15, 2022 02:48
648d1d3
to
a53f550
Compare
aaneja
reviewed
Dec 27, 2022
presto-main/src/test/java/com/facebook/presto/operator/scalar/sql/TestMapTopNFunction.java
Show resolved
Hide resolved
kaikalur
approved these changes
Jan 4, 2023
@rschlussel and @jainxrohit please review this PR. Its been pending for a very long time now. Thanks in advance! |
rschlussel
approved these changes
Jan 6, 2023
30 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adding support of
MAP_TOP_N
for Presto.MAP_TOP_N(map(K, V)) -> map(K, V)
Test plan
Added unit tests.
Build successfully using the following terminal command
mvn -Dtest=TestMapTopNFunction test