Github user thvasilo commented on the issue:
https://github.com/apache/flink/pull/2740
@greghogan Excuse my ignorance, I'm only now learning about Flink internals
:)
It seems like the issue here was that `partitionByRange` partitions keys in
ascending order but we want the end result in descending order.
@tfournier314 I think the following should work, here I use a key extractor
to negate the value of the key to achieve the desired effect:
```Scala
itData.map(s => (s,1))
.groupBy(0)
.sum(1)
.partitionByRange(x => -x._2) // Take the negative count as the key
.sortPartition(1, Order.DESCENDING)
.zipWithIndex
```
---
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 [email protected] or file a JIRA ticket
with INFRA.
---