marchpure commented on a change in pull request #3922: URL: https://github.com/apache/carbondata/pull/3922#discussion_r487350326
########## File path: core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/ImplicitExpression.java ########## @@ -60,12 +61,16 @@ public ImplicitExpression(Map<String, Set<Integer>> blockIdToBlockletIdMapping) private void addBlockEntry(String blockletPath) { String blockId = blockletPath.substring(0, blockletPath.lastIndexOf(CarbonCommonConstants.FILE_SEPARATOR)); + // Check if blockletPath contains old tuple id format, and convert it to compatible format. + if (blockId.contains("batchno")) { + blockId = CarbonTablePath.getShortBlockId(blockId).substring(blockletPath.indexOf('/') + 1); + } Set<Integer> blockletIds = blockIdToBlockletIdMapping.get(blockId); if (null == blockletIds) { blockletIds = new HashSet<>(); blockIdToBlockletIdMapping.put(blockId, blockletIds); } - blockletIds.add(Integer.parseInt(blockletPath.substring(blockId.length() + 1))); + blockletIds.add(Integer.parseInt(blockletPath.substring(blockletPath.lastIndexOf('/') + 1))); Review comment: use File.seperator instead of '/' ########## File path: core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/ImplicitExpression.java ########## @@ -60,12 +61,16 @@ public ImplicitExpression(Map<String, Set<Integer>> blockIdToBlockletIdMapping) private void addBlockEntry(String blockletPath) { String blockId = blockletPath.substring(0, blockletPath.lastIndexOf(CarbonCommonConstants.FILE_SEPARATOR)); + // Check if blockletPath contains old tuple id format, and convert it to compatible format. + if (blockId.contains("batchno")) { + blockId = CarbonTablePath.getShortBlockId(blockId).substring(blockletPath.indexOf('/') + 1); Review comment: use File.seperator instead of '/' ########## File path: core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/ImplicitExpression.java ########## @@ -60,12 +61,16 @@ public ImplicitExpression(Map<String, Set<Integer>> blockIdToBlockletIdMapping) private void addBlockEntry(String blockletPath) { String blockId = blockletPath.substring(0, blockletPath.lastIndexOf(CarbonCommonConstants.FILE_SEPARATOR)); Review comment: use File.seperator instead of CarbonCommonConstants.FILE_SEPARATOR ########## File path: core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/ImplicitExpression.java ########## @@ -60,12 +61,16 @@ public ImplicitExpression(Map<String, Set<Integer>> blockIdToBlockletIdMapping) private void addBlockEntry(String blockletPath) { String blockId = blockletPath.substring(0, blockletPath.lastIndexOf(CarbonCommonConstants.FILE_SEPARATOR)); + // Check if blockletPath contains old tuple id format, and convert it to compatible format. + if (blockId.contains("batchno")) { + blockId = CarbonTablePath.getShortBlockId(blockId).substring(blockletPath.indexOf('/') + 1); + } Set<Integer> blockletIds = blockIdToBlockletIdMapping.get(blockId); if (null == blockletIds) { blockletIds = new HashSet<>(); blockIdToBlockletIdMapping.put(blockId, blockletIds); } - blockletIds.add(Integer.parseInt(blockletPath.substring(blockId.length() + 1))); + blockletIds.add(Integer.parseInt(blockletPath.substring(blockletPath.lastIndexOf('/') + 1))); Review comment: use File.seperator instead of '/' ########## File path: core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/ImplicitExpression.java ########## @@ -60,12 +61,16 @@ public ImplicitExpression(Map<String, Set<Integer>> blockIdToBlockletIdMapping) private void addBlockEntry(String blockletPath) { String blockId = blockletPath.substring(0, blockletPath.lastIndexOf(CarbonCommonConstants.FILE_SEPARATOR)); + // Check if blockletPath contains old tuple id format, and convert it to compatible format. + if (blockId.contains("batchno")) { + blockId = CarbonTablePath.getShortBlockId(blockId).substring(blockletPath.indexOf('/') + 1); Review comment: use File.seperator instead of '/' ########## File path: core/src/main/java/org/apache/carbondata/core/scan/expression/conditional/ImplicitExpression.java ########## @@ -60,12 +61,16 @@ public ImplicitExpression(Map<String, Set<Integer>> blockIdToBlockletIdMapping) private void addBlockEntry(String blockletPath) { String blockId = blockletPath.substring(0, blockletPath.lastIndexOf(CarbonCommonConstants.FILE_SEPARATOR)); Review comment: use File.seperator instead of CarbonCommonConstants.FILE_SEPARATOR ---------------------------------------------------------------- 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