jonvex commented on code in PR #9743:
URL: https://github.com/apache/hudi/pull/9743#discussion_r1360860550


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/block/HoodieAvroDataBlock.java:
##########
@@ -206,6 +213,9 @@ public IndexedRecord next() {
         IndexedRecord record = this.reader.read(null, decoder);
         this.dis.skipBytes(recordLength);
         this.readRecords++;
+        if (this.promotedSchema.isPresent()) {
+          return  HoodieAvroUtils.rewriteRecordWithNewSchema(record, 
this.promotedSchema.get());

Review Comment:
   
https://github.com/apache/hudi/blob/908ae8d3f54adcd9ba24205c9d66add546079c58/hudi-common/src/main/java/org/apache/hudi/avro/AvroCastingGenericRecord.java
 this was an implementation I had but I don't think it will do any better 
performance wise. Since types are wrapped in objects, I don't think rewriting 
the record will have that much overhead. Am I right about that?



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