[
https://issues.apache.org/jira/browse/FLINK-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14229899#comment-14229899
]
ASF GitHub Bot commented on FLINK-1112:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/incubator-flink/pull/209#discussion_r21094436
--- Diff:
flink-java/src/main/java/org/apache/flink/api/java/operators/UnsortedGrouping.java
---
@@ -230,5 +231,21 @@ public UnsortedGrouping(DataSet<T> set, Keys<T> keys) {
public SortedGrouping<T> sortGroup(String field, Order order) {
return new SortedGrouping<T>(this.dataSet, this.keys, field,
order);
}
+
+ /**
+ * Sorts Pojos or Tuple within a group with specified {@link
org.apache.flink.api.java.functions.KeySelector} in the specified {@link
Order}.</br>
--- End diff --
The JavaDoc documentation needs some work, IMO.
KeySelectors are not restricted to Pojos and Tuples. They can extract a key
from any data type.
I would phrase it as: "Sorts elements within a group on a key extracted by
the specified KeySelector in the specified order."
The `@param order` refers to a field which has not been mentioned before.
Should be the key extracted by the KeySelector.
> Add GroupSorting with KeySelectors
> ----------------------------------
>
> Key: FLINK-1112
> URL: https://issues.apache.org/jira/browse/FLINK-1112
> Project: Flink
> Issue Type: Improvement
> Components: Java API, Scala API
> Reporter: Fabian Hueske
> Assignee: Mingliang Qi
>
> Group sorting is currently only supported for field-index keys and not for
> KeySelectors.
> This feature was requested.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)