lokeshj1703 commented on code in PR #13741:
URL: https://github.com/apache/hudi/pull/13741#discussion_r2348685260


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/HoodieIndexUtils.java:
##########
@@ -656,16 +656,7 @@ public static <R> HoodieRecord<R> 
createNewTaggedHoodieRecord(HoodieRecord<R> ol
   public static void register(HoodieTableMetaClient metaClient, 
HoodieIndexDefinition indexDefinition) {
     LOG.info("Registering index {} of using {}", 
indexDefinition.getIndexName(), indexDefinition.getIndexType());
     // build HoodieIndexMetadata and then add to index definition file
-    boolean indexDefnUpdated = 
metaClient.buildIndexDefinition(indexDefinition);
-    if (indexDefnUpdated) {
-      String indexMetaPath = metaClient.getIndexDefinitionPath();
-      // update table config if necessary
-      if 
(!metaClient.getTableConfig().getProps().containsKey(HoodieTableConfig.RELATIVE_INDEX_DEFINITION_PATH.key())
-          || 
!metaClient.getTableConfig().getRelativeIndexDefinitionPath().isPresent()) {
-        
metaClient.getTableConfig().setValue(HoodieTableConfig.RELATIVE_INDEX_DEFINITION_PATH,
 FSUtils.getRelativePartitionPath(metaClient.getBasePath(), new 
StoragePath(indexMetaPath)));
-        HoodieTableConfig.update(metaClient.getStorage(), 
metaClient.getMetaPath(), metaClient.getTableConfig().getProps());
-      }
-    }
+    metaClient.buildIndexDefinition(indexDefinition);

Review Comment:
   Addressed. Currently we are not using its return value but it might be 
useful in future.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to