klsince commented on code in PR #11729:
URL: https://github.com/apache/pinot/pull/11729#discussion_r1355756437


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/forward/FixedByteChunkSVForwardIndexReader.java:
##########
@@ -91,4 +92,41 @@ public double getDouble(int docId, ChunkReaderContext 
context) {
       return _rawData.getDouble(docId * Double.BYTES);
     }
   }
+
+  @Override
+  public boolean isBufferByteRangeInfoSupported() {
+    return true;
+  }
+
+  @Override
+  public void recordDocIdByteRanges(int docId, ChunkReaderContext context, 
@Nullable List<ByteRange> ranges) {
+    if (!_isCompressed) {
+      // If uncompressed, should use fixed offset
+      throw new UnsupportedOperationException("Forward index is fixed length 
type");
+    }
+    recordDocIdRanges(docId, context, ranges);
+  }
+
+  @Override
+  public boolean isFixedOffsetMappingType() {
+    return !_isCompressed;
+  }
+
+  @Override
+  public long getRawDataStartOffset() {
+    if (isFixedOffsetMappingType()) {
+      return _rawDataStart;
+    } else {
+      throw new UnsupportedOperationException("Forward index is not fixed 
length type");

Review Comment:
   nit: can throw exp w/o `else {}` as if-branch has `return`



-- 
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]

Reply via email to