JeremiahDJordan commented on code in PR #2673:
URL: https://github.com/apache/cassandra/pull/2673#discussion_r1370412676
##########
src/java/org/apache/cassandra/index/sai/disk/PrimaryKeyMap.java:
##########
@@ -70,6 +71,22 @@ default void close()
*/
long rowIdFromPrimaryKey(PrimaryKey key);
+ /**
+ * Returns the first row ID for a given token or a negative value if not
found
+ *
+ * @param token the {@link Token} to lookup
+ * @return the first row ID associated with the {@link Token} or a
negative value
+ */
+ long ceiling(Token token);
+
+ /**
+ * Returns the last row ID for a given partition range or the previous row
ID if there was no match for the partition range
Review Comment:
My understanding is that ceiling is returning the first row id following a
given token, "round up", and floor is returning the first row id before a given
token, "round down", which is the last row id of the previous token. I can see
how there can be slight confusion on first and last here with floor and
ceiling. My understanding is given `a b c X d e f`. `floor(X)` returns `c` and
`ceiling(X)` returns `d`.
--
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]