wzx140 commented on code in PR #6745:
URL: https://github.com/apache/hudi/pull/6745#discussion_r992380483


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieConcatHandle.java:
##########
@@ -93,8 +93,8 @@ public HoodieConcatHandle(HoodieWriteConfig config, String 
instantTime, HoodieTa
    */
   @Override
   public void write(HoodieRecord oldRecord) {
-    String key = oldRecord.getRecordKey(keyGeneratorOpt);
-    Schema schema = useWriterSchemaForCompaction ? tableSchemaWithMetaFields : 
tableSchema;

Review Comment:
   In previous, it is `write(GenericRecord oldRecord)`. I just want to get the 
schema. The old condition is wrong. 
   
   oldRecord must be read from table. So its schema is 
`config.populateMetaFields() ? tableSchemaWithMetaFields : tableSchema`
   
   newRecord from keyToNewRecords must be incomming or compaction. So its 
schema is `useWriterSchemaForCompaction ? tableSchemaWithMetaFields : 
tableSchema`



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