hmatu commented on issue #1185: [HUDI-500]: use enum method to replace switch 
case
URL: https://github.com/apache/incubator-hudi/pull/1185#issuecomment-570875500
 
 
   hi @dengziming, WDYT?
   ```
   public enum HoodieTableType {
   
       COPY_ON_WRITE {
         @Override
         public String getCommitActionType() {
           return HoodieActiveTimeline.COMMIT_ACTION;
         }
       },
   
       MERGE_ON_READ {
         @Override
         public String getCommitActionType() {
           return HoodieActiveTimeline.DELTA_COMMIT_ACTION;
         }
       };
   
       public HoodieTimeline getCommitsTimeline(HoodieTableMetaClient 
metaClient) {
         return metaClient.getActiveTimeline().getCommitTimeline();
       }
   
       public HoodieTimeline 
getCommitsAndCompactionTimeline(HoodieTableMetaClient metaClient) {
         return metaClient.getActiveTimeline().getCommitTimeline();
       }
   
       public HoodieTimeline getCommitTimeline(HoodieTableMetaClient 
metaClient) {
         return metaClient.getActiveTimeline().getCommitTimeline();
       }
   
     public abstract String getCommitActionType();
   }
   ```

----------------------------------------------------------------
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

Reply via email to