ringles commented on a change in pull request #6670:
URL: https://github.com/apache/geode/pull/6670#discussion_r664773903



##########
File path: 
geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/collections/OrderStatisticsTree.java
##########
@@ -205,6 +205,32 @@ public boolean add(E element) {
     return true;
   }
 
+  public ArrayList<E> getIndexRange(int min, int max) {
+    ArrayList<E> entryList = new ArrayList<>();
+    Node<E> current = getNode(min);
+    for (int i = min; current != null && i <= max; i++) {
+      entryList.add(current.key);

Review comment:
       Hmm. The problem is that here, the OrderStatisticsTree only has 
OrderedSetEntries. So we're getting a list of OrderedSetEntries out of 
OrderStatisticsTree, and then in RedisSortedSet.zrange() we're returning a list 
of byte[]'s. The bytes have to be extracted _somehow_. I'd like to hold off and 
see how we implement a couple of the other range commands, to see what the best 
way to refactor this is.




-- 
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]


Reply via email to