siddharthteotia commented on a change in pull request #7898:
URL: https://github.com/apache/pinot/pull/7898#discussion_r768281636
##########
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:
When do we need to instantiate the handler with both segment reader and
writer ? I see IndexHandlerFactory separately using the reader (for checking if
preprocess is needed) and writer(for creating new)
--
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]