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/09/12 01:31:00 UTC
[GitHub] [carbondata] marchpure commented on a change in pull request #3922: [CARBONDATA-3983] SI compatability issue
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
----------------------------------------------------------------
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