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



##########
File path: 
core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java
##########
@@ -648,11 +648,20 @@ public static String getShortBlockId(String blockId) {
             .replace(DATA_PART_PREFIX, "").replace(CARBON_DATA_EXT, "");
     // to remove compressor name
     if (!blockId.equalsIgnoreCase(blockIdWithCompressorName)) {
-      int index = blockIdWithCompressorName.lastIndexOf(".");
+      int index = blockIdWithCompressorName.lastIndexOf(POINT);
+      int fileSeperatorIndex = 
blockIdWithCompressorName.lastIndexOf(File.separator);
       if (index != -1) {
-        String replace =
-            
blockIdWithCompressorName.replace(blockIdWithCompressorName.substring(index), 
"");
-        return replace;
+        String modifiedBlockId;

Review comment:
       Can extract common code from partition table and non-partition table to 
get block Id to new method

##########
File path: 
core/src/test/java/org/apache/carbondata/core/util/CarbonUtilTest.java
##########
@@ -928,6 +928,11 @@ public void testTupeIDInUpdateScenarios() {
     Assert.assertEquals(CarbonTablePath.getShortBlockId(blockId), 
"0/0-0_0-0-0-1597409791503");
     blockId = 
"c3=aa/part-0-100100000100001_batchno0-0-0-1597411003332.snappy.carbondata";
     
Assert.assertEquals(CarbonTablePath.getShortBlockIdForPartitionTable(blockId), 
"c3=aa/0-100100000100001_0-0-0-1597411003332");
+    // CACHE_LEVEL = BLOCKLET case

Review comment:
       Please add a functional testcase for this scenario and check data after 
setting cache_level=blocklet




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