Skip to content

Commit

Permalink
[FLINK-15549] Fix Integer overflow in ResettableIterator. (#10903)
Browse files Browse the repository at this point in the history
The ResettableIterator had a data overflow problem if the number of elements in a single input exceeded Integer.MAX_VALUE.
  • Loading branch information
killxdcj authored and pnowojski committed Jan 21, 2020
1 parent d44848c commit 90ad2e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public class SpillingResettableIterator<T> implements ResettableIterator<T> {

protected final TypeSerializer<T> serializer;

private int elementCount;
private long elementCount;

private int currentElementNum;
private long currentElementNum;

protected final SpillingBuffer buffer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ public class SpillingResettableMutableObjectIterator<T> implements ResettableMut

protected final TypeSerializer<T> serializer;

private int elementCount;
private long elementCount;

private int currentElementNum;
private long currentElementNum;

protected final SpillingBuffer buffer;

Expand Down

0 comments on commit 90ad2e6

Please sign in to comment.