提交 cb19c749 编写于 作者: U Ufuk Celebi 提交者: Stephan Ewen

[FLINK-1110] Fix IndexOutOfBoundsException in ListKeyGroupedIterator

Occured when calling nextKey() and iterator not consumed with *last* key group.
上级 aea6a6d4
......@@ -89,7 +89,7 @@ public final class ListKeyGroupedIterator<E> {
// Required if user code / reduce() method did not read the whole value iterator.
E next;
while (true) {
if ((next = this.input.get(currentPosition++)) != null) {
if (currentPosition < input.size() && (next = this.input.get(currentPosition++)) != null) {
if (!this.comparator.equalToReference(next)) {
// the keys do not match, so we have a new group. store the current key
this.comparator.setReference(next);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册