Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/20284#discussion_r162168466
--- Diff:
common/kvstore/src/test/java/org/apache/spark/util/kvstore/DBIteratorSuite.java
---
@@ -112,7 +114,8 @@ public void setup() throws Exception {
t.key = "key" + i;
t.id = "id" + i;
t.name = "name" + RND.nextInt(MAX_ENTRIES);
- t.num = RND.nextInt(MAX_ENTRIES);
+ // Force one item to have an integer value of zero to test the fix
for SPARK-23103.
+ t.num = (i != 0) ? (int) RND.nextLong() : 0;
--- End diff --
`nextInt` doesn't return negative values. I can add a mod operator here,
but the code already explicitly generates some clashes a few lines below.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]