vikramahuja1001 commented on a change in pull request #3934:
URL: https://github.com/apache/carbondata/pull/3934#discussion_r505186238
##########
File path: core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
##########
@@ -2758,12 +2758,20 @@ public static String getBlockId(AbsoluteTableIdentifier
identifier, String fileP
String segmentId, boolean isTransactionalTable, boolean isStandardTable,
boolean isPartitionTable) {
String blockId;
- String blockName = filePath.substring(filePath.lastIndexOf("/") + 1);
+ String blockName;
+ if (filePath.lastIndexOf("/") != -1) {
+ blockName = filePath.substring(filePath.lastIndexOf("/") + 1);
+ } else {
+ blockName = filePath.substring(filePath.lastIndexOf(File.separator) + 1);
+ filePath = filePath.replace(File.separator,
CarbonCommonConstants.FILE_SEPARATOR);
+ }
+
String tablePath = identifier.getTablePath();
if (filePath.startsWith(tablePath)) {
if (!isTransactionalTable || isStandardTable) {
- blockId = "Part0" + CarbonCommonConstants.FILE_SEPARATOR + "Segment_"
+ segmentId
+ blockId = "Part0" + CarbonCommonConstants.FILE_SEPARATOR + "Segment_"
+ + segmentId + segmentId
Review comment:
why is segmentID used twice instead of a UUID?
----------------------------------------------------------------
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:
[email protected]