pranavshenoy commented on code in PR #4909:
URL: https://github.com/apache/cassandra/pull/4909#discussion_r3488451533
##########
src/java/org/apache/cassandra/index/sai/disk/v1/postings/PostingsReader.java:
##########
@@ -88,18 +156,43 @@ public static class BlocksSummary
{
private final IndexInput input;
final int blockSize;
- final int numPostings;
+ public final int numPostings;
+ // V2 section boundaries expressed as posting counts. For V1 /
exact-only lists both equal numPostings.
+ public final int prefixIndex;
+ public final int suffixIndex;
final LongArray offsets;
final LongArray maxValues;
public BlocksSummary(IndexInput input, long offset) throws IOException
+ {
+ this(input, offset, false);
+ }
+
+ public BlocksSummary(IndexInput input, long offset, boolean isV2)
throws IOException
{
this.input = input;
input.seek(offset);
+
+ int pIdx = -1;
+ int sIdx = -1;
+ if (isV2)
+ {
+ pIdx = input.readVInt();
+ sIdx = input.readVInt();
+ }
+
this.blockSize = input.readVInt();
//TODO This should need to change because we can potentially end
up with postings of more than Integer.MAX_VALUE?
Review Comment:
should we change it to long since we will have more postings with prefix?
--
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]