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 2022/09/06 01:35:16 UTC

[GitHub] [hudi] yihua commented on a diff in pull request #6486: [HUDI-4706] Fix InternalSchemaChangeApplier#applyAddChange error to add nest type

yihua commented on code in PR #6486:
URL: https://github.com/apache/hudi/pull/6486#discussion_r963181777


##########
hudi-common/src/main/java/org/apache/hudi/internal/schema/action/InternalSchemaChangeApplier.java:
##########
@@ -51,7 +51,8 @@ public InternalSchema applyAddChange(
       TableChange.ColumnPositionChange.ColumnPositionType positionType) {
     TableChanges.ColumnAddChange add = TableChanges.ColumnAddChange.get(latestSchema);
     String parentName = TableChangesHelper.getParentName(colName);
-    add.addColumns(parentName, colName, colType, doc);
+    String leafName = TableChangesHelper.getLeafName(colName);
+    add.addColumns(parentName, leafName, colType, doc);

Review Comment:
   Could you add tests around nested fields to guard the changes?



-- 
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-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org