Github user manishgupta88 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1984#discussion_r169540997
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java
 ---
    @@ -161,9 +212,13 @@ private void readMergeFile(String mergeFilePath) 
throws IOException {
         MergedBlockIndex mergedBlockIndex = readMergeBlockIndex(thriftReader);
         List<String> file_names = indexHeader.getFile_names();
         List<ByteBuffer> fileData = mergedBlockIndex.getFileData();
    +    CarbonFile mergeFile = FileFactory.getCarbonFile(mergeFilePath);
         assert (file_names.size() == fileData.size());
         for (int i = 0; i < file_names.size(); i++) {
           carbonIndexMap.put(file_names.get(i), fileData.get(i).array());
    +      carbonIndexMapWithFullPath.put(
    +          mergeFile.getParentFile().getAbsolutePath() + 
CarbonCommonConstants.FILE_SEPARATOR
    +              + file_names.get(i), fileData.get(i).array());
         }
         thriftReader.close();
    --- End diff --
    
    use try and finally block and close the thrift reader inside finally block


---

Reply via email to