klsince commented on a change in pull request #7898:
URL: https://github.com/apache/pinot/pull/7898#discussion_r771740893



##########
File path: 
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/invertedindex/InvertedIndexHandler.java
##########
@@ -45,17 +45,41 @@
 
   private final File _indexDir;
   private final SegmentMetadata _segmentMetadata;
+  private final SegmentDirectory.Reader _segmentReader;
   private final SegmentDirectory.Writer _segmentWriter;
   private final HashSet<String> _columnsToAddIdx;
 
   public InvertedIndexHandler(File indexDir, SegmentMetadata segmentMetadata, 
IndexLoadingConfig indexLoadingConfig,
       SegmentDirectory.Writer segmentWriter) {
+    this(indexDir, segmentMetadata, indexLoadingConfig, null, segmentWriter);
+  }
+
+  public InvertedIndexHandler(SegmentMetadata segmentMetadata, 
IndexLoadingConfig indexLoadingConfig,
+      SegmentDirectory.Reader segmentReader) {
+    this(null, segmentMetadata, indexLoadingConfig, segmentReader, null);
+  }
+
+  private InvertedIndexHandler(File indexDir, SegmentMetadata segmentMetadata, 
IndexLoadingConfig indexLoadingConfig,

Review comment:
       refactored, and now segment reader/writer is passed to updateIndicies() 
and needUpdateIndices(), instead of to constructor. 




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