You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/07/17 11:16:47 UTC

[GitHub] [hudi] leesf commented on pull request #1832: [HUDI-1099]: improve quality of the code calling the method.HiveSyncTool#syncPartitions

leesf commented on pull request #1832:
URL: https://github.com/apache/hudi/pull/1832#issuecomment-660050240


   > > @mabin001 Thanks for you contributing, `addPartitionsToTable` and `updatePartitionsToTable ` are good to handle empty partitions and it is a more proper way IMHO.
   > 
   > I agree with you about `addPartitionsToTable` and `updatePartitionsToTable ` are good to handle empty partitions,but We should determine the list is empty or not empty before calling the method。So, i think i can delete the code of this
   > ![image](https://user-images.githubusercontent.com/23548282/87765779-d3840080-c84a-11ea-9bcd-79fdb4a7ccae.png)
   > ![image](https://user-images.githubusercontent.com/23548282/87765850-e72f6700-c84a-11ea-93e7-aca497c5fa28.png)
   > .
   > TestHiveSyncTool#testBasicSync
   > ![image](https://user-images.githubusercontent.com/23548282/87766256-7177cb00-c84b-11ea-8095-cdb4cca9350b.png)
   > can delete too.
   
   Thanks for the explanation @mabin001 . In fact I do think current solution is more reasonable and cleaner IMHO, other callers would call the method without checking the empty and let the method to check empty. If you check empty before calling the method, there will be a lot of duplicate code. 


----------------------------------------------------------------
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:
users@infra.apache.org