You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by gvramana <gi...@git.apache.org> on 2018/03/02 13:39:24 UTC

[GitHub] carbondata pull request #2006: [CARBONDATA-2209] Fixed rename table with par...

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

    https://github.com/apache/carbondata/pull/2006#discussion_r171848791
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/SegmentIndexFileStore.java ---
    @@ -108,11 +109,20 @@ public void readAllIIndexOfSegment(SegmentFileStore segmentFileStore, SegmentSta
               location =
                   segmentFileStore.getTablePath() + CarbonCommonConstants.FILE_SEPARATOR + location;
             }
    +        String mergeFileName = locations.getValue().getMergeFileName();
             for (String indexFile : locations.getValue().getFiles()) {
               CarbonFile carbonFile = FileFactory
                   .getCarbonFile(location + CarbonCommonConstants.FILE_SEPARATOR + indexFile);
    -          if (carbonFile.exists()) {
    +          if (carbonFile.exists() && !indexFiles.contains(carbonFile.getAbsolutePath())) {
                 carbonIndexFiles.add(carbonFile);
    +            indexFiles.add(carbonFile.getAbsolutePath());
    +          } else if (mergeFileName != null) {
    --- End diff --
    
    Can move mergeFilename logic out of loop


---