ulysses-you commented on code in PR #58466:
URL: https://github.com/apache/spark/pull/58466#discussion_r3914540989
##########
common/kvstore/src/main/java/org/apache/spark/util/kvstore/LevelDBIterator.java:
##########
@@ -147,6 +147,9 @@ public T next() {
} else {
byte[] key = ti.buildKey(false, ti.naturalIndex().keyPrefix(null),
next);
ret = db.get(key, type);
+ if (ret == null) {
+ throw new NoSuchElementException();
Review Comment:
Fixed in bd1f128afc6: both iterators now throw `NoSuchElementException(new
String(key, UTF_8))`, matching `read()`.
##########
common/kvstore/src/main/java/org/apache/spark/util/kvstore/RocksDBIterator.java:
##########
@@ -133,6 +133,9 @@ public T next() {
} else {
byte[] key = ti.buildKey(false, ti.naturalIndex().keyPrefix(null),
next);
ret = db.get(key, type);
+ if (ret == null) {
+ throw new NoSuchElementException();
Review Comment:
Same as above, fixed in bd1f128afc6.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]