Zouxxyy commented on code in PR #8888:
URL: https://github.com/apache/hudi/pull/8888#discussion_r1218934624


##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/avro/HoodieAvroParquetReader.java:
##########
@@ -90,7 +83,7 @@ public Void getCurrentKey() throws IOException, 
InterruptedException {
   @Override
   public ArrayWritable getCurrentValue() throws IOException, 
InterruptedException {
     GenericRecord record = parquetRecordReader.getCurrentValue();
-    return (ArrayWritable) 
HoodieRealtimeRecordReaderUtils.avroToArrayWritable(record, baseSchema, true);
+    return (ArrayWritable) 
HoodieRealtimeRecordReaderUtils.avroToArrayWritable(record, record.getSchema(), 
true);

Review Comment:
   @xicm  Sorry, it was my mistake.The base schema must be used here to 
generate full ArrayWriable array(other cols are null).
   
     
   
![image](https://github.com/apache/hudi/assets/37108074/f260304d-e79e-4c3c-a45f-d42d4ba34c5b)
   
   
   And I compared the result of ParquetRecordReader, the results are consistent



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