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

    https://github.com/apache/carbondata/pull/1674#discussion_r158095586
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/metadata/PartitionMapFileStore.java
 ---
    @@ -176,13 +179,87 @@ public PartitionMapper readPartitionMap(String 
partitionMapPath) {
       public void readAllPartitionsOfSegment(String segmentPath) {
         CarbonFile[] partitionFiles = getPartitionFiles(segmentPath);
         if (partitionFiles != null && partitionFiles.length > 0) {
    +      partionedSegment = true;
           for (CarbonFile file : partitionFiles) {
             PartitionMapper partitionMapper = 
readPartitionMap(file.getAbsolutePath());
             partitionMap.putAll(partitionMapper.getPartitionMap());
           }
         }
       }
     
    +  public boolean isPartionedSegment() {
    +    return partionedSegment;
    +  }
    +
    +  /**
    +   * Drops the partitions from the partition mapper file of the segment 
and writes to a new file.
    +   * @param segmentPath
    +   * @param partitionsToDrop
    +   * @param uniqueId
    +   * @throws IOException
    +   */
    +  public void dropPartitions(String segmentPath, List<String> 
partitionsToDrop, String uniqueId)
    --- End diff --
    
    Latest file reading always can make query to read intermediate state, so 
Query should always should stick to previously committed timestamp. 
    It is better to be handled in separate issue "support committed timestamp 
based read interface to data maps making them to read only committed content". 


---

Reply via email to