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


##########
hudi-common/src/test/java/org/apache/hudi/common/table/read/TestHoodieFileGroupReaderBase.java:
##########
@@ -279,7 +279,12 @@ public void 
testReadLogFilesOnlyInMergeOnReadTable(RecordMergeMode recordMergeMo
   private static List<Pair<String, IndexedRecord>> 
hoodieRecordsToIndexedRecords(List<HoodieRecord> hoodieRecords, Schema schema) {
     return hoodieRecords.stream().map(r -> {
       try {
-        return r.toIndexedRecord(schema, CollectionUtils.emptyProps());
+        Option<HoodieAvroIndexedRecord> avroIndexedRecordOption = 
r.toIndexedRecord(schema, CollectionUtils.emptyProps());
+        if (avroIndexedRecordOption.isPresent()) {
+          // eager deser
+          avroIndexedRecordOption.get().getData().get(0);

Review Comment:
   Here, we are just fetching first entry in the data. don't think this 
warrants to check for record type and only fetch the first entry if the data 
type is `SerializableIndexedRecord`. 
   this is simpler to maintain. 
   



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