ravipesala commented on a change in pull request #3355: [HOTFIX] Improve select 
query after Update/Delete operation.
URL: https://github.com/apache/carbondata/pull/3355#discussion_r344614803
 
 

 ##########
 File path: 
core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java
 ##########
 @@ -348,50 +324,67 @@ public boolean isBlockValid(String segName, String 
blockName) {
           return deleteFileList;
         }
         final long deltaEndTimeStamp = getEndTimeOfDeltaFile(extension, block);
-
-        // final long deltaEndTimeStamp = block.getDeleteDeltaEndTimeAsLong();
-        // final long deltaStartTimestamp = 
block.getDeleteDeltaStartTimeAsLong();
-        return getFilePaths(blockDir, blockNameFromTuple, extension, 
deleteFileList,
-            deltaStartTimestamp, deltaEndTimeStamp);
+        // If start and end time is same then it has only one delta file so 
construct the file
+        // directly with available information with out listing
+        if 
(block.getDeleteDeltaStartTimestamp().equals(block.getDeleteDeltaEndTimestamp()))
 {
+          deleteFileList.add(
+              blockDir + CarbonCommonConstants.FILE_SEPARATOR + 
block.getBlockName() + "-" + block
 
 Review comment:
   Ok, For better performance and memory utilization StringBuilder is better 
for simple concatenation. So I used StringBuilder.

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to