Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2290#discussion_r188128386
--- Diff:
core/src/main/java/org/apache/carbondata/core/readcommitter/LatestFilesReadCommittedScope.java
---
@@ -40,9 +40,26 @@
public class LatestFilesReadCommittedScope implements ReadCommittedScope {
private String carbonFilePath;
+ private String segmentId;
private ReadCommittedIndexFileSnapShot readCommittedIndexFileSnapShot;
private LoadMetadataDetails[] loadMetadataDetails;
+ /**
+ * a new constructor of this class, which supports obtain lucene index
in search mode
+ *
+ * @param path carbon file path
+ * @param segmentId segment id
+ */
+ public LatestFilesReadCommittedScope(String path, String segmentId) {
--- End diff --
I mean that these code can be reduced to
```
this(path);
this.segmentId=segmentId;
```
and you should move the next constructor(Line65) above this constructor.
---