You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/27 09:36:28 UTC

[GitHub] [kafka] patrickstuedi commented on a change in pull request #11120: Add support for infinite endpoints for range queries

patrickstuedi commented on a change in pull request #11120:
URL: https://github.com/apache/kafka/pull/11120#discussion_r677285658



##########
File path: streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBRangeIterator.java
##########
@@ -63,17 +65,20 @@
         final KeyValue<Bytes, byte[]> next = super.makeNext();
         if (next == null) {
             return allDone();
+        } else if (rawLastKey == null) {
+            return next;
+
         } else {
             if (forward) {
-                if (comparator.compare(next.key.get(), rawLastKey) < 0) {
+                if (rawLastKey != null && comparator.compare(next.key.get(), rawLastKey) < 0) {

Review comment:
       Good catch. Yes this check can be eliminated now that there is a common null check in the beginnin. 




-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org