marchpure commented on a change in pull request #3553: [CARBONDATA-3648] Support Alter Table Compaction Level Threshold URL: https://github.com/apache/carbondata/pull/3553#discussion_r362250557
########## File path: core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java ########## @@ -81,7 +81,7 @@ public static String getFolderContainingFile(String carbonFilePath) { int lastIndex = carbonFilePath.lastIndexOf('/'); // below code for handling windows environment if (-1 == lastIndex) { - lastIndex = carbonFilePath.lastIndexOf(CarbonCommonConstants.FILE_SEPARATOR); + lastIndex = carbonFilePath.lastIndexOf(CarbonCommonConstants.WINDOWS_FILE_SEPARATOR); Review comment: carbonFilePath is in type of '/root/schema', while it is in type of 'D:\schema'. The separator is different, dividing into FILE_SEPARATOR ('/') and WINDOWS_FILE_SEPARATOR ('\'). In the Windows Env. The variant 'lastIndex' is always -1, carbonFilePath.substring(0, lastIndex) will be throw SubStringIndexOutOfBound Exception. ---------------------------------------------------------------- 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 With regards, Apache Git Services