[
https://issues.apache.org/jira/browse/FLINK-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15138595#comment-15138595
]
ASF GitHub Bot commented on FLINK-3234:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/1585#discussion_r52282391
--- Diff:
flink-tests/src/test/scala/org/apache/flink/api/scala/operators/SortPartitionITCase.scala
---
@@ -166,6 +167,58 @@ class SortPartitionITCase(mode: TestExecutionMode)
extends MultipleProgramsTestB
TestBaseUtils.compareResultAsText(result.asJava, expected)
}
+ @Test
+ def testSortPartitionWithKeySelector1(): Unit = {
+ val env = ExecutionEnvironment.getExecutionEnvironment
+ env.setParallelism(4)
+ val ds = CollectionDataSets.get3TupleDataSet(env)
+
+ val result = ds
+ .map { x => x }.setParallelism(4)
+ .sortPartition(_._2, Order.DESCENDING)
--- End diff --
Change sort order to `ASCENDING` (or in the other test).
> SortPartition does not support KeySelectorFunctions
> ---------------------------------------------------
>
> Key: FLINK-3234
> URL: https://issues.apache.org/jira/browse/FLINK-3234
> Project: Flink
> Issue Type: Improvement
> Components: DataSet API
> Affects Versions: 1.0.0, 0.10.1
> Reporter: Fabian Hueske
> Assignee: Chiwan Park
> Fix For: 1.0.0
>
>
> The following is not supported by the DataSet API:
> {code}
> DataSet<MyObject> data = ...
> DataSet<MyObject> data.sortPartition(
> new KeySelector<MyObject, Long>() {
> public Long getKey(MyObject v) {
> ...
> }
> },
> Order.ASCENDING);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)