alexeykudinkin commented on code in PR #6358:
URL: https://github.com/apache/hudi/pull/6358#discussion_r1028364451


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/SparkAvroPostProcessor.java:
##########
@@ -40,8 +41,13 @@ public SparkAvroPostProcessor(TypedProperties props, 
JavaSparkContext jssc) {
 
   @Override
   public Schema processSchema(Schema schema) {
-    return schema != null ? AvroConversionUtils.convertStructTypeToAvroSchema(
-        AvroConversionUtils.convertAvroSchemaToStructType(schema), 
RowBasedSchemaProvider.HOODIE_RECORD_STRUCT_NAME,
-        RowBasedSchemaProvider.HOODIE_RECORD_NAMESPACE) : null;
+    if (schema == null) {
+      return null;
+    }
+
+    StructType structType = 
AvroConversionUtils.convertAvroSchemaToStructType(schema);
+    // NOTE: It's critical that we preserve incoming schema's qualified 
record-name to make
+    //       sure we maintain schema's compatibility (as defined by 
[[AvroSchemaCompatibility]])
+    return AvroConversionUtils.convertStructTypeToAvroSchema(structType, 
schema.getFullName());

Review Comment:
   Correct. Schema namespace are not being matched anymore



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