flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramkrish86 <...@git.apache.org>
Subject [GitHub] flink pull request: FLINK-3650 Add maxBy/minBy to Scala DataSet AP...
Date Wed, 04 May 2016 11:46:02 GMT
Github user ramkrish86 commented on a diff in the pull request:

    --- 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 --
    I just updated the PR with the return type ReduceOperator. I was trying to work with scala
Tuples and tried creating an example like SelectByFunctionsTest.  TupleTypeInfo and related
things lik TupleSerializer and Tuplecomparator all accepts only java based tuples and not
scala tuples. So am not pretty sure on how to make this SelectByMaxFunction to work with scala
tuples.  Is there any other code that makes thing work with both scala.Tuple and java tuples?

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message