[GitHub] [carbondata] Indhumathi27 commented on a change in pull request #3179: [CARBONDATA-3338] Support Incremental DataLoad for MV Datamap[with single parent table]

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] Indhumathi27 commented on a change in pull request #3179: [CARBONDATA-3338] Support Incremental DataLoad for MV Datamap[with single parent table]

GitBox
Indhumathi27 commented on a change in pull request #3179: [CARBONDATA-3338] Support Incremental DataLoad for MV Datamap[with single parent table]
URL: https://github.com/apache/carbondata/pull/3179#discussion_r278642763
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/datamap/status/DataMapStatusManager.java
 ##########
 @@ -127,4 +150,115 @@ private static DataMapSchema getDataMapSchema(String dataMapName)
     return DataMapStoreManager.getInstance().getDataMapSchema(dataMapName);
   }
 
+  /**
+   * Returns valid segment list for a given RelationIdentifier
+   *
+   * @param relationIdentifier
+   * @return
+   * @throws IOException
+   */
+  public static List<String> getSegmentList(RelationIdentifier relationIdentifier)
+      throws IOException {
+    List<String> segmentList = new ArrayList<>();
+    AbsoluteTableIdentifier absoluteTableIdentifier =
+        AbsoluteTableIdentifier.from(relationIdentifier.getTablePath());
+    List<Segment> validSegments =
+        new SegmentStatusManager(absoluteTableIdentifier).getValidAndInvalidSegments()
+            .getValidSegments();
+    for (Segment segment : validSegments) {
+      segmentList.add(segment.getSegmentNo());
+    }
+    return segmentList;
+  }
+
+  /**
+   * This method will delete segment folders of the mv datamap table and update the
+   * datamapSegmentStatus map in case of Insert-Overwrite/Update operation on main table
 
 Review comment:
   Okay..done

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services