Adding support of MAP_TOP_N for Presto#18698
Merged
kaikalur merged 1 commit intoprestodb:masterfrom Jan 6, 2023
Merged
Conversation
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
079fa55 to
563f69d
Compare
Contributor
|
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
8715c8b to
97e615a
Compare
af1b8ed to
648d1d3
Compare
kaikalur
approved these changes
Dec 14, 2022
rewriting the function to return top n map entries by value
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
Contributor
Author
|
@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
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
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_Nfor 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