[
https://issues.apache.org/jira/browse/FLINK-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15132308#comment-15132308
]
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_r51870968
--- Diff:
flink-scala/src/main/scala/org/apache/flink/api/scala/PartitionSortedDataSet.scala
---
@@ -39,12 +41,25 @@ class PartitionSortedDataSet[T: ClassTag](set:
SortPartitionOperator[T])
this
}
-/**
- * Appends the given field and order to the sort-partition operator.
- */
+ /**
+ * Appends the given field and order to the sort-partition operator.
+ */
override def sortPartition(field: String, order: Order): DataSet[T] = {
this.set.sortPartition(field, order)
this
}
+ /**
+ * Appends the given field and order to the sort-partition operator.
+ */
+ override def sortPartition[K: TypeInformation](fun: T => K, order:
Order): DataSet[T] = {
--- End diff --
Do not allow chaining of `KeySelector`s. Make sure different key types are
not mixed.
> 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)