pranavshenoy commented on code in PR #4909:
URL: https://github.com/apache/cassandra/pull/4909#discussion_r3584340314
##########
src/java/org/apache/cassandra/index/sai/memory/TrieMemoryIndex.java:
##########
@@ -360,6 +368,50 @@ private KeyRangeIterator rangeMatch(Expression expression,
AbstractBounds<Partit
return new InMemoryKeyRangeIterator(cd.mergedKeys.peek(),
cd.maximumKey, cd.mergedKeys);
}
+ /**
+ * Matches all rows whose indexed term starts with the expression's value,
by scanning the trie over the range
+ * {@code [prefix, prefixSuccessor)}. The lower bound is inclusive so a
term equal to the prefix is matched too.
+ */
+ private KeyRangeIterator prefixMatch(Expression expression,
AbstractBounds<PartitionPosition> keyRange)
+ {
+ ByteBuffer prefixBuffer = expression.lower().value.encoded;
+ ByteComparable lowerBound = asComparableBytes(prefixBuffer);
+ ByteBuffer successor = prefixSuccessor(prefixBuffer);
Review Comment:
This is only for in-memory search
--
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]