ravipesala commented on a change in pull request #3154: [WIP]Fixed performance issue
URL:
https://github.com/apache/carbondata/pull/3154#discussion_r267318798
##########
File path: core/src/main/java/org/apache/carbondata/core/datastore/impl/FileFactory.java
##########
@@ -81,16 +81,30 @@ public static FileReader getFileHolder(FileType fileType, Configuration configur
}
public static FileType getFileType(String path) {
- String lowerPath = path.toLowerCase();
- if (lowerPath.startsWith(CarbonCommonConstants.HDFSURL_PREFIX)) {
+ if (path.startsWith(CarbonCommonConstants.HDFSURL_PREFIX) || path.toLowerCase()
Review comment:
I think this will do more object creations if the type is not HDFS because of many times `||` conditions and lower case conversions. Please extract a private method and call first with actual string if it returns null then convert to lowercase and call again the same method. if it still returns null then return LOCAL
----------------------------------------------------------------
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:
[hidden email]
With regards,
Apache Git Services