yihua commented on code in PR #9572:
URL: https://github.com/apache/hudi/pull/9572#discussion_r1316485372


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/stats/ColumnStatsIndices.java:
##########
@@ -300,12 +298,7 @@ private static List<RowData> readColumnStatsIndexByColumns(
     return records.collectAsList().stream().parallel().map(record -> {
           // schema and props are ignored for generating metadata record from 
the payload
           // instead, the underlying file system, or bloom filter, or columns 
stats metadata (part of payload) are directly used
-          GenericRecord genericRecord;
-          try {
-            genericRecord = (GenericRecord) 
record.getData().getInsertValue(null, null).orElse(null);
-          } catch (IOException e) {
-            throw new HoodieException("Exception while getting insert value 
from metadata payload");
-          }
+          GenericRecord genericRecord = (GenericRecord) 
record.getData().toHoodieMetadataRecord().orElse(null);

Review Comment:
   Given that this still calls the `HoodieMetadataPayload` APIs which 
implements `HoodieRecordPayload`, shall we keep these as is?  Ideally, once we 
migrate the metadata payload to new merger API, these can be got rid of.



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