vinothchandar commented on code in PR #13519:
URL: https://github.com/apache/hudi/pull/13519#discussion_r2226880970


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeHandler.java:
##########
@@ -36,9 +38,12 @@ public interface UpgradeHandler {
    * @param context                instance of {@link HoodieEngineContext} to 
be used.
    * @param instantTime            current instant time that should not be 
touched.
    * @param upgradeDowngradeHelper instance of {@link 
SupportsUpgradeDowngrade} to be used.
-   * @return Map of config properties and its values to be added to table 
properties.
+   * @return Map of config properties and its values to be added to table 
properties,
+   *         and a list configs to remove.
    */
-  Map<ConfigProperty, String> upgrade(
-      HoodieWriteConfig config, HoodieEngineContext context, String 
instantTime,
+  Pair<Map<ConfigProperty, String>, List<ConfigProperty>> upgrade(

Review Comment:
   can we create a pojo for this. 
   
   @yihua may be we should land lombok first.. from the other PR.. 



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeDowngrade.java:
##########
@@ -115,7 +117,9 @@ public boolean needsUpgrade(HoodieTableVersion 
toWriteVersion) {
    * 0.10.0 -> v3
    * 0.11.0 -> v4
    * 0.12.0 to 0.13.0 -> v5
-   * 0.14.0 to current -> v6
+   * 0.14.0 to 0.x -> v6
+   * 1.0.0 to 1.0.2 -> v8
+   * 1.1.0 to current -> v9

Review Comment:
   is this comment maintainable.. remove?



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/UpgradeDowngrade.java:
##########
@@ -199,8 +206,14 @@ public void run(HoodieTableVersion toVersion, String 
instantTime) {
       metaClient.getTableConfig().setTableVersion(toVersion);
     }
 
-    HoodieTableConfig.update(metaClient.getStorage(),
-        metaClient.getMetaPath(), metaClient.getTableConfig().getProps());
+    // Remove properties.
+    Set<String> propertiesToRemove =
+        
tablePropsToRemove.stream().map(ConfigProperty::key).collect(Collectors.toSet());
+    HoodieTableConfig.delete(
+        metaClient.getStorage(), metaClient.getMetaPath(), propertiesToRemove);

Review Comment:
   why the new line/formatting?



##########
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableConfig.java:
##########
@@ -1106,6 +1117,10 @@ public PartialUpdateMode getPartialUpdateMode() {
     }
   }
 
+  public String getMergeProperties() {

Review Comment:
   is this another encoding of k-v property pairs into a string.. 
   
   if so - see my comments here. 
   
   https://github.com/apache/hudi/pull/13498#discussion_r2224118191
   
   can we also fix this and move all custom merge properties to 
`hoodie.merge.custom.*` prefix.. and handle that in upgrade/downgrade as well. 
This is a separate, but blocker PR. 



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