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


##########
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:
   @Jackie-Jiang I had to modify this API to pass indexConfig for Forward Index 
Handler. The api is very similar to non-static API with different signature. 
   Let me know if you think we should implement it in a different way. 



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