nsivabalan commented on code in PR #10288:
URL: https://github.com/apache/hudi/pull/10288#discussion_r1421674974


##########
hudi-common/src/main/java/org/apache/hudi/internal/schema/utils/AvroSchemaEvolutionUtils.java:
##########
@@ -140,10 +140,14 @@ public static Schema reconcileSchema(Schema 
incomingSchema, Schema oldTableSchem
    * @return schema (based off {@code source} one) that has nullability 
constraints and datatypes reconciled
    */
   public static Schema reconcileSchemaRequirements(Schema sourceSchema, Schema 
targetSchema, Map<String, String> opts) {
-    if (sourceSchema.getType() == Schema.Type.NULL || 
sourceSchema.getFields().isEmpty() || targetSchema.getFields().isEmpty()) {
+    if (targetSchema.getType() == Schema.Type.NULL || 
targetSchema.getFields().isEmpty()) {

Review Comment:
   Balaji: I guess up until 0.14.0, we had isempty check explicitly for df that 
we consume from source before ingesting to hudi. but due to perf reasons, we 
removed that check. Hence we are running into this issue post 0.14.0 
   So, would prefer to avoid checking df.isEmpty in this case. 
   



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