akashrn5 commented on a change in pull request #3561: [HOTFIX] Fix INSERT STAGE
footer read error
URL: https://github.com/apache/carbondata/pull/3561#discussion_r364571797
##########
File path:
core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java
##########
@@ -714,4 +714,18 @@ public static String generateBadRecordsPath(String
badLogStoreLocation, String s
CarbonCommonConstants.FILE_SEPARATOR + taskNo;
}
}
+
+ /**
+ * Return the parent path of the input file.
+ * For example, if input file path is /user/warehouse/t1/file.carbondata
+ * then return will be /user/warehouse/t1
+ */
+ public static String getParentPath(String dataFilePath) {
+ int endIndex =
dataFilePath.lastIndexOf(CarbonCommonConstants.FILE_SEPARATOR);
+ if (endIndex > -1) {
Review comment:
can we replace if else with conditional operator here?
----------------------------------------------------------------
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]
With regards,
Apache Git Services