Presto can take a 2nd/3rd argument (n) to get largest value of all input values in the following 4 functions:
- min(col, n)
- max(col, n)
- min_by(col1, col2, n)
- max_by(col1, col2, n)
However, Presto restricts n to 10000 or less since v0.194.
When calling the above functions, using a large value for n can cause performance issues in Presto clusters. As a result, Presto will return an error when a value greater than 10000 is for used for n.
Assign a value less than 10000 to n, when you call any of the 4 functions.