the-other-tim-brown commented on code in PR #10342: URL: https://github.com/apache/hudi/pull/10342#discussion_r1429243393
########## hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/StreamSync.java: ########## @@ -1010,8 +1008,9 @@ private void reInitWriteClient(Schema sourceSchema, Schema targetSchema, Option< if (HoodieStreamerUtils.isDropPartitionColumns(props)) { targetSchema = HoodieAvroUtils.removeFields(targetSchema, HoodieStreamerUtils.getPartitionColumns(props)); } - registerAvroSchemas(sourceSchema, targetSchema); - final HoodieWriteConfig initialWriteConfig = getHoodieClientConfig(targetSchema); + final Pair<HoodieWriteConfig, Schema> initialWriteConfigAndSchema = getHoodieClientConfigAndWriterSchema(targetSchema, true); + final HoodieWriteConfig initialWriteConfig = initialWriteConfigAndSchema.getLeft(); + registerAvroSchemas(sourceSchema, initialWriteConfigAndSchema.getRight()); Review Comment: Ordering was wrong previously. In this edge case, we would not register the avro schema for the actual target schema if we fall back to reading it from the commits. -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org