vinishjail97 commented on code in PR #648: URL: https://github.com/apache/incubator-xtable/pull/648#discussion_r1961227386
########## xtable-hive-metastore/src/main/java/org/apache/xtable/hms/HMSCatalogSyncClient.java: ########## @@ -70,12 +75,25 @@ public HMSCatalogSyncClient( HMSCatalogConfig hmsCatalogConfig, Configuration configuration, IMetaStoreClient metaStoreClient, - CatalogTableBuilder tableBuilder) { + CatalogTableBuilder tableBuilder, + Optional<CatalogPartitionSyncTool> partitionSyncTool) { this.catalogConfig = catalogConfig; this.hmsCatalogConfig = hmsCatalogConfig; this.configuration = configuration; this.metaStoreClient = metaStoreClient; this.tableBuilder = tableBuilder; + this.partitionSyncTool = partitionSyncTool; + } + + private Optional<CatalogPartitionSyncTool> getPartitionSyncTool(String tableFormat) { + String partitionValueExtractorClass = hmsCatalogConfig.getPartitionExtractorClass(); + CatalogPartitionSyncOperations hmsCatalogPartitionSyncOperations = + new HMSCatalogPartitionSyncOperations(metaStoreClient, hmsCatalogConfig); Review Comment: You can avoid this line by passing `new HMSCatalogPartitionSyncOperations(metaStoreClient, hmsCatalogConfig)` inline. Is this called only during _init ? Then it should be part of the same function to avoid mis-use of `getPartitionSyncTool` -- 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. To unsubscribe, e-mail: commits-unsubscr...@xtable.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org