You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/11/24 02:26:36 UTC
[GitHub] [flink] wuchong commented on a change in pull request #14173: [FLINK-20271][FLINK-20272][table] Fix ArrayIndexOutOfBounds and wrong result for TopN
wuchong commented on a change in pull request #14173:
URL: https://github.com/apache/flink/pull/14173#discussion_r529152526
##########
File path: flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/operators/rank/RetractableTopNFunction.java
##########
@@ -190,6 +191,19 @@ public void processElement(RowData input, Context ctx, Collector<RowData> out) t
}
}
+ if (!stateRemoved) {
+ // the input record has not been removed from state
+ // should update the data state
+ List<RowData> inputs = dataState.get(sortKey);
+ if (inputs != null) {
+ inputs.remove(input);
Review comment:
Good point.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org