akashrn5 commented on a change in pull request #4220: URL: https://github.com/apache/carbondata/pull/4220#discussion_r719397599
########## File path: core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java ########## @@ -366,17 +366,28 @@ public boolean accept(CarbonFile pathName) { */ public List<String> getDeleteDeltaFilesList(final Segment segment, final String blockName) { List<String> deleteDeltaFileList = new ArrayList<>(); - String segmentPath = CarbonTablePath.getSegmentPath( - identifier.getTablePath(), segment.getSegmentNo()); + String segmentPath = null; + if (segment.isExternalSegment()) { + for (LoadMetadataDetails details : segmentDetails) { + if (details.getLoadName().equals(segment.getSegmentNo())) { + segmentPath = details.getPath(); + break; + } + } + } else { + segmentPath = CarbonTablePath.getSegmentPath( + identifier.getTablePath(), segment.getSegmentNo()); + } for (SegmentUpdateDetails block : updateDetails) { if ((block.getBlockName().equalsIgnoreCase(blockName)) && (block.getSegmentName().equalsIgnoreCase(segment.getSegmentNo())) && !CarbonUpdateUtil.isBlockInvalid(block.getSegmentStatus())) { Set<String> deltaFileTimestamps = block.getDeltaFileStamps(); if (deltaFileTimestamps != null && deltaFileTimestamps.size() > 0) { + String finalSegmentPath = segmentPath; Review comment: why one more variable is required? -- 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. To unsubscribe, e-mail: dev-unsubscr...@carbondata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org