raghavyadav01 commented on code in PR #15526:
URL: https://github.com/apache/pinot/pull/15526#discussion_r2078274406


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/forward/ForwardIndexReaderFactory.java:
##########
@@ -68,10 +68,33 @@ public static ForwardIndexReaderFactory getInstance() {
   protected ForwardIndexReader createIndexReader(PinotDataBuffer dataBuffer, 
ColumnMetadata metadata,
       ForwardIndexConfig indexConfig)
       throws IndexReaderConstraintException {
+    if (indexConfig != null && 
indexConfig.getConfigs().containsKey(ForwardIndexType.FORWARD_INDEX_READER_CLASS_NAME))
 {
+      String className = 
indexConfig.getConfigs().get(ForwardIndexType.FORWARD_INDEX_READER_CLASS_NAME).toString();
+      try {
+        return (ForwardIndexReader) 
Class.forName(className).getConstructor(PinotDataBuffer.class, 
ColumnMetadata.class)
+            .newInstance(dataBuffer, metadata);
+      } catch (Exception e) {
+        throw new RuntimeException("Failed to create ForwardIndexReader", e);
+      }
+    }
+    return createIndexReader(dataBuffer, metadata);
+  }
+
+  public static ForwardIndexReader createIndexReader(PinotDataBuffer 
dataBuffer, ForwardIndexConfig indexConfig,

Review Comment:
   removed the static API. 



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to