[
https://issues.apache.org/jira/browse/FLINK-2549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14905686#comment-14905686
]
ASF GitHub Bot commented on FLINK-2549:
---------------------------------------
Github user ChengXiangLi commented on a diff in the pull request:
https://github.com/apache/flink/pull/1161#discussion_r40280217
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/operators/sort/FixedLengthRecordSorter.java
---
@@ -447,11 +447,13 @@ public void writeToOutput(final
ChannelWriterOutputView output, final int start,
num -= recordsPerSegment;
} else {
// partially filled segment
- for (; num > 0; num--) {
+ for (; num > 0 && offset <=
this.lastEntryOffset; num--, offset += this.recordSize) {
--- End diff --
Yes, it is. It only support to write data inside a `MemorySegment`
previously, it's work well before because it only called with `num = 1`. I
would create a separate JIRA for this.
> Add topK operator for DataSet
> -----------------------------
>
> Key: FLINK-2549
> URL: https://issues.apache.org/jira/browse/FLINK-2549
> Project: Flink
> Issue Type: New Feature
> Components: Core, Java API, Scala API
> Reporter: Chengxiang Li
> Assignee: Chengxiang Li
> Priority: Minor
>
> topK is a common operation for user, it would be great to have it in Flink.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)