rahil-c commented on code in PR #14313:
URL: https://github.com/apache/hudi/pull/14313#discussion_r2550506175


##########
hudi-common/src/main/java/org/apache/hudi/common/schema/HoodieSchema.java:
##########
@@ -106,6 +106,27 @@ public static HoodieSchema fromAvroSchema(Schema 
avroSchema) {
     return new HoodieSchema(avroSchema);
   }
 
+  /**
+   * Converts an Option<Schema> to Option<HoodieSchema>.
+   *
+   * @param schemaOption the optional Avro schema
+   * @return Option containing HoodieSchema, or empty if input was empty
+   */
+  public static Option<HoodieSchema> fromAvroSchemaOption(Option<Schema> 
schemaOption) {
+    return schemaOption.map(HoodieSchema::fromAvroSchema);
+  }
+
+  /**
+   * Converts an Option<HoodieSchema> to Option<Schema>.
+   *
+   * @param hoodieSchemaOption the optional HoodieSchema
+   * @return Option containing Avro Schema, or empty if input was empty
+   */
+  public static Option<Schema> toAvroSchemaOption(Option<HoodieSchema>
+                                                          hoodieSchemaOption) {
+    return hoodieSchemaOption.map(HoodieSchema::toAvroSchema);
+  }
+

Review Comment:
   nice catch, forgot to remove this



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