shenjiayu17 commented on a change in pull request #3986:
URL: https://github.com/apache/carbondata/pull/3986#discussion_r507380663



##########
File path: 
processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java
##########
@@ -1246,8 +1209,22 @@ public static boolean isHorizontalCompactionEnabled() {
     // set the update status.
     segmentUpdateStatusManager.setUpdateStatusDetails(segmentUpdateDetails);
 
-    CarbonFile[] deleteDeltaFiles =
-        segmentUpdateStatusManager.getDeleteDeltaFilesList(new Segment(seg), 
blockName);
+    // only when SegmentUpdateDetails contain the specified block
+    // will the method getDeleteDeltaFilesList be executed
+    List<String> blockNameList = 
segmentUpdateStatusManager.getBlockNameFromSegment(seg);
+    Map<String, List<CarbonFile>> blockAndDeleteDeltaFilesMap = new 
HashMap<>();
+    CarbonFile[] deleteDeltaFiles = null;
+    if (blockNameList.contains(blockName)) {

Review comment:
       Done. Combined the two judgement




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to