the-other-tim-brown commented on code in PR #17801:
URL: https://github.com/apache/hudi/pull/17801#discussion_r2698680988


##########
hudi-common/src/main/java/org/apache/hudi/common/schema/HoodieSchemaUtils.java:
##########
@@ -515,10 +521,10 @@ public static HoodieSchema 
appendFieldsToSchemaDedupNested(HoodieSchema schema,
 
   /**
    * Appends provided new fields at the end of the given schema
-   *
+   * <p></p>

Review Comment:
   Should this be enclosing some text?



##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/postprocessor/add/AddPrimitiveColumnSchemaPostProcessor.java:
##########
@@ -91,17 +99,12 @@ private Schema.Field buildNewColumn() {
     ValidationUtils.checkArgument(!StringUtils.isNullOrEmpty(type));
     ValidationUtils.checkArgument(!Schema.Type.NULL.getName().equals(type));
 
-    Schema newSchema = createSchema(type, nullable);
-
-    return new Schema.Field(columnName, newSchema, doc, 
defaultValue.isPresent() ? defaultValue.get() : null);
+    HoodieSchema newSchema = createSchema(type, nullable);
+    return HoodieSchemaField.of(columnName, newSchema, doc, 
defaultValue.isPresent() ? defaultValue.get() : null);

Review Comment:
   simplify with `defaultValue.orElse(null)`



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