maedhroz commented on code in PR #2943:
URL: https://github.com/apache/cassandra/pull/2943#discussion_r1409816455
##########
src/java/org/apache/cassandra/index/sai/disk/v1/WidePrimaryKeyMap.java:
##########
@@ -166,10 +177,7 @@ private Clustering<?> readClusteringKey(long sstableRowId)
// Returns the rowId of the next partition or the number of rows if
supplied rowId is in the last partition
private long startOfNextPartition(long rowId)
{
- long partitionId = partitionArray.get(rowId);
- long nextPartitionRowId = partitionArray.indexOf(++partitionId);
- if (nextPartitionRowId == -1)
- nextPartitionRowId = partitionArray.length();
- return nextPartitionRowId;
+ long partitionSize = partitionSizeArray.get(partitionArray.get(rowId));
Review Comment:
nit: Would consider being clearer here that this is a number of rows for
people skimming.
This is nice though. The idea is to avoid the binary search and just lookup
the size directly?
--
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]