jonvex commented on code in PR #13711:
URL: https://github.com/apache/hudi/pull/13711#discussion_r2352935167


##########
hudi-common/src/main/java/org/apache/hudi/avro/AvroSchemaUtils.java:
##########
@@ -423,22 +428,24 @@ private static Schema pruneDataSchemaInternal(Schema 
dataSchema, Schema required
         }
         List<Schema.Field> newFields = new ArrayList<>();
         for (Schema.Field requiredSchemaField : requiredSchema.getFields()) {
-          Schema.Field dataSchemaField = 
dataSchema.getField(requiredSchemaField.name());
-          if (dataSchemaField != null) {
-            Schema.Field newField = new Schema.Field(
-                dataSchemaField.name(),
-                pruneDataSchema(dataSchemaField.schema(), 
requiredSchemaField.schema(), Collections.emptySet()),
-                dataSchemaField.doc(),
-                dataSchemaField.defaultVal()
-            );
-            newFields.add(newField);
-          } else if (mandatoryFields.contains(requiredSchemaField.name())) {
+          if (mandatoryFields.contains(requiredSchemaField.name())) {

Review Comment:
   The reason for this change is because of timestamp partition column. 
Sometimes we read it as a string even when the table schema has it as a long 
etc. 



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