You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by sujith71955 <gi...@git.apache.org> on 2016/12/01 18:53:26 UTC

[GitHub] incubator-carbondata pull request #336: [CARBONDATA-426] replace if else wit...

Github user sujith71955 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/336#discussion_r90511807
  
    --- Diff: integration/spark/src/main/java/org/apache/carbondata/integration/spark/merger/CarbonCompactionUtil.java ---
    @@ -198,21 +183,16 @@ public static CompactionType determineCompactionType(String metaFolderPath) {
        * @return
        */
       public static boolean deleteCompactionRequiredFile(String metaFolderPath,
    -      CompactionType compactionType) {
    -    String compactionRequiredFile;
    -    if (compactionType.equals(CompactionType.MINOR_COMPACTION)) {
    -      compactionRequiredFile = metaFolderPath + CarbonCommonConstants.FILE_SEPARATOR
    -          + CarbonCommonConstants.minorCompactionRequiredFile;
    -    } else {
    -      compactionRequiredFile = metaFolderPath + CarbonCommonConstants.FILE_SEPARATOR
    -          + CarbonCommonConstants.majorCompactionRequiredFile;
    -    }
    +                                                     CompactionType compactionType) {
    +    String file = metaFolderPath + CarbonCommonConstants.FILE_SEPARATOR;
    +    String compactionRequiredFile = compactionType.equals(CompactionType.MINOR_COMPACTION) ?
    --- End diff --
    
    Enum comparison better to use ==


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---