You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2020/08/04 07:06:12 UTC

[GitHub] [carbondata] kunal642 commented on a change in pull request #3837: [CARBONDATA-3927]Remove compressor name from tupleID to make it short to improve store size and performance.

kunal642 commented on a change in pull request #3837:
URL: https://github.com/apache/carbondata/pull/3837#discussion_r464843011



##########
File path: core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java
##########
@@ -952,10 +952,22 @@ public static String getSegmentBlockNameKey(String segID, String blockName,
     String blockNameWithOutPart = blockName
         .substring(blockName.indexOf(CarbonCommonConstants.HYPHEN) + 1,
             blockName.lastIndexOf(CarbonTablePath.getCarbonDataExtension()));
+    // to remove compressor name
+    int index = blockNameWithOutPart.lastIndexOf(CarbonCommonConstants.POINT);
     if (isPartitionTable) {
-      return blockNameWithOutPart;
+      if (index != -1) {
+        return blockNameWithOutPart.replace(blockNameWithOutPart.substring(index), "");
+      } else {
+        return blockNameWithOutPart;
+      }
+    }
+    if (index != -1) {
+      String blockNameWithoutCompressorName =
+          blockNameWithOutPart.replace(blockNameWithOutPart.substring(index), "");
+      return segID + CarbonCommonConstants.FILE_SEPARATOR + blockNameWithoutCompressorName;
+    } else {
+      return segID + CarbonCommonConstants.FILE_SEPARATOR + blockNameWithOutPart;

Review comment:
       Please add a unit test to validate this functionality




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