manojpec commented on a change in pull request #4449: URL: https://github.com/apache/hudi/pull/4449#discussion_r789068263
########## File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/storage/HoodieHFileWriter.java ########## @@ -122,7 +128,13 @@ public boolean canWrite() { @Override public void writeAvro(String recordKey, IndexedRecord object) throws IOException { - byte[] value = HoodieAvroUtils.avroToBytes((GenericRecord)object); + byte[] value = HoodieAvroUtils.avroToBytes((GenericRecord) object); + if (schemaRecordKeyField.isPresent()) { + GenericRecord recordKeyExcludedRecord = HoodieAvroUtils.bytesToAvro(value, this.schema); Review comment: Added the check for non empty key string before doing this. Let me know if you are referring to some other additional check here. -- 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