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


##########
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:
   if its empty df i.e. 0 records, its ok to go ahead and make an empty commit 
w/ schema set to target schema. So, I don't see much necessity. Let me know wdyt



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