vamshikrishnakyatham commented on code in PR #13852:
URL: https://github.com/apache/hudi/pull/13852#discussion_r2328525003


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/utils/LegacyArchivedMetaEntryReader.java:
##########
@@ -100,7 +100,7 @@ private Pair<HoodieInstant, Option<byte[]>> 
readInstant(GenericRecord record) {
       Object actionData = record.get(key);
       if (actionData != null) {
         if (actionData instanceof IndexedRecord) {
-          return HoodieAvroUtils.avroToBytes((IndexedRecord) actionData);
+          return 
HoodieAvroUtils.convertIndexedRecordToAvroFileFormat((IndexedRecord) 
actionData);

Review Comment:
   Well, not exactly, the problem is with the casting in 
`LegacyArchivedMetaEntryReader`. The actionData is a `GenericDataRecord` (which 
implements IndexedRecord), but `convertMetadataToByteArray` eventually calls 
`CommitMetadataSerDeV1.getInstantWriter()` which expects a 
`SpecificRecordBase`, not a `GenericRecord`. Following the similar conversion 
logic, I wrote a new method `convertIndexedRecordToAvroFileFormat` and we 
should be good @danny0405 :)



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