Indhumathi27 commented on a change in pull request #3848:
URL: https://github.com/apache/carbondata/pull/3848#discussion_r457401996



##########
File path: 
hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonOutputCommitter.java
##########
@@ -234,13 +234,7 @@ private void commitJobFinal(JobContext context, 
CarbonLoadModel loadModel,
     String segmentsToBeDeleted =
         
context.getConfiguration().get(CarbonTableOutputFormat.SEGMENTS_TO_BE_DELETED, 
"");
     List<Segment> segmentDeleteList = 
Segment.toSegmentList(segmentsToBeDeleted.split(","), null);
-    Set<Segment> segmentSet = new HashSet<>();
-    if (updateTime != null || uniqueId != null) {
-      segmentSet = new HashSet<>(
-          new SegmentStatusManager(carbonTable.getAbsoluteTableIdentifier(),
-              
context.getConfiguration()).getValidAndInvalidSegments(carbonTable.isMV())
-                  .getValidSegments());
-    }
+    Set<Segment> segmentSet = Collections.singleton(loadModel.getSegment());

Review comment:
       segmentSet can be moved inside `  if (updateTime != null || uniqueId != 
null) {` check. If updateTime and uniqueId is null, this value will be unused




----------------------------------------------------------------
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:
[email protected]


Reply via email to