danny0405 commented on a change in pull request #3465:
URL: https://github.com/apache/hudi/pull/3465#discussion_r691889565
##########
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:
`_hoodie_operation` is a metadata field !
--
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]