nsivabalan commented on a change in pull request #3465:
URL: https://github.com/apache/hudi/pull/3465#discussion_r691791697



##########
File path: hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java
##########
@@ -223,9 +223,13 @@ public static Schema addMetadataFields(Schema schema, 
boolean withOperationField
   }
 
   public static Schema removeMetadataFields(Schema schema) {
+    return removeFields(schema, HoodieRecord.HOODIE_META_COLUMNS);
+  }
+
+  public static Schema removeFields(Schema schema, List<String> 
fieldsToRemove) {
     List<Schema.Field> filteredFields = schema.getFields()
                                               .stream()
-                                              .filter(field -> 
!HoodieRecord.HOODIE_META_COLUMNS_WITH_OPERATION.contains(field.name()))
+                                              .filter(field -> 
!fieldsToRemove.contains(field.name()))
                                               .map(field -> new 
Schema.Field(field.name(), field.schema(), field.doc(), field.defaultVal()))

Review comment:
       is "_hoodie_operation" considered a meta field? then yeah, we need to 
fix 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