AMashenkov commented on a change in pull request #739:
URL: https://github.com/apache/ignite-3/pull/739#discussion_r833002638



##########
File path: 
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/index/SortedIndexStorage.java
##########
@@ -58,12 +64,63 @@
      */
     void remove(IndexRow row);
 
+    /** Exclude lower bound. */
+    byte GREATER = 0;
+
+    /** Include lower bound. */
+    byte GREATER_OR_EQUAL = 1;
+
+    /** Exclude upper bound. */
+    byte LESS = 0;
+
+    /** Include upper bound. */
+    byte LESS_OR_EQUAL = 1 << 1;
+
+    byte FORWARD = 0;
+
+    byte BACKWARDS = 1 << 2;
+
     /**
      * Returns a range of index values between the lower bound (inclusive) and 
the upper bound (inclusive).
      */
     // TODO: add options https://issues.apache.org/jira/browse/IGNITE-16059
     Cursor<IndexRow> range(IndexRowPrefix lowerBound, IndexRowPrefix 
upperBound);
 
+    /**
+     * Returns a range of index values between the lower bound and the upper 
bound, consistent with the passed timestamp.
+     *
+     * @param lowerBound Lower bound. Exclusivity is controlled by a {@link 
#GREATER_OR_EQUAL} or {@link #GREATER} flag.
+     *      {@code null} means unbounded.
+     * @param upperBound Upper bound. Exclusivity is controlled by a {@link 
#LESS} or {@link #LESS_OR_EQUAL} flag.
+     *      {@code null} means unbounded.
+     * @param flags Control flags. {@link #GREATER} | {@link #LESS} | {@link 
#FORWARD} by default. Other available values
+     *      are {@link #GREATER_OR_EQUAL}, {@link #LESS_OR_EQUAL} and {@link 
#BACKWARDS}.
+     * @param timestamp Timestamp value for consistent multiversioned index 
scan.
+     * @param columnsProjection Bit set with column indexes to return. {@code 
null} means returning all available columns.
+     * @param partitionFilter Partition filter predicate. {@code null} means 
returning data from all partitions.
+     * @return Cursor with fetched index rows.
+     * @throws IllegalArgumentException If backwards flag is passed and 
backwards iteration is not supported by the storage.

Review comment:
       Let's add smth like UnsupportedBackwardIndexScanException exception for 
this




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