sashapolo commented on code in PR #979:
URL: https://github.com/apache/ignite-3/pull/979#discussion_r938910305
##########
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/index/SortedIndexMvStorage.java:
##########
@@ -51,68 +50,47 @@ public interface SortedIndexMvStorage {
int BACKWARDS = 1 << 2;
/**
- * The sole purpose of this class is to avoid massive refactoring while
changing the original IndexRow.
+ * Returns the Index Descriptor of this storage.
*/
- interface IndexRowEx {
- /**
- * Key-only binary row if index-only scan is supported, full binary
row otherwise.
- */
- BinaryRow row();
+ SortedIndexDescriptor indexDescriptor();
- /**
- * Returns indexed column value.
- *
- * @param idx PK column index.
- * @return Indexed column value.
- */
- Object value(int idx);
- }
+ /**
+ * Returns a factory for creating index rows for this storage.
+ */
+ IndexRowSerializer indexRowSerializer();
- boolean supportsBackwardsScan();
+ /**
+ * Returns a class deserializing index columns.
+ */
+ IndexRowDeserializer indexRowDeserializer();
- boolean supportsIndexOnlyScan();
+ /**
+ * Adds the given index row to the index.
+ */
+ void put(IndexRow row);
/**
- * Returns a range of index values between the lower bound and the upper
bound, consistent with the passed transaction id.
+ * Removes the given key from the index.
*
- * @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 txId Transaction id for consistent multi-versioned index scan.
- * @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.
+ * <p>Removing a non-existent key is a no-op.
*/
- Cursor<IndexRowEx> scan(
- @Nullable IndexRowPrefix lowerBound,
- @Nullable IndexRowPrefix upperBound,
- @MagicConstant(flagsFromClass = SortedIndexStorage.class) int
flags,
- UUID txId,
- @Nullable IntPredicate partitionFilter
- );
+ void remove(IndexRow row);
/**
- * Returns a range of index values between the lower bound and the upper
bound, consistent with the passed timestamp.
+ * Returns a range of index values between the lower bound and the upper
bound, consistent with the passed transaction id.
Review Comment:
oops
--
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]