[ 
https://issues.apache.org/jira/browse/FLINK-3650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15268381#comment-15268381
 ] 

ASF GitHub Bot commented on FLINK-3650:
---------------------------------------

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1856#discussion_r61853470
  
    --- Diff: 
flink-java/src/main/java/org/apache/flink/api/java/functions/SelectByMinFunction.java
 ---
    @@ -72,8 +73,8 @@ public T reduce(T value1, T value2) throws Exception {
                for (int position : fields) {
                        // Save position of compared key
                        // Get both values - both implement comparable
    -                   Comparable comparable1 = 
value1.getFieldNotNull(position);
    -                   Comparable comparable2 = 
value2.getFieldNotNull(position);
    +                   Comparable comparable1 = 
((Tuple)value1).getFieldNotNull(position);
    --- End diff --
    
    Yes, since it was intended to work with Flink's Java tuples. But a Scala 
tuple is not a subtype of `Tuple`. Thus, I would assume that you can't reuse 
the Java implementation here.


> Add maxBy/minBy to Scala DataSet API
> ------------------------------------
>
>                 Key: FLINK-3650
>                 URL: https://issues.apache.org/jira/browse/FLINK-3650
>             Project: Flink
>          Issue Type: Improvement
>          Components: Java API, Scala API
>    Affects Versions: 1.1.0
>            Reporter: Till Rohrmann
>            Assignee: ramkrishna.s.vasudevan
>
> The stable Java DataSet API contains the API calls {{maxBy}} and {{minBy}}. 
> These methods are not supported by the Scala DataSet API. These methods 
> should be added in order to have a consistent API.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to