danny0405 commented on code in PR #13964:
URL: https://github.com/apache/hudi/pull/13964#discussion_r2373817877


##########
hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroReaderContext.java:
##########
@@ -192,8 +192,8 @@ public Option<HoodieRecordMerger> 
getRecordMerger(RecordMergeMode mergeMode, Str
   }
 
   @Override
-  public SizeEstimator<BufferedRecord<IndexedRecord>> getRecordSizeEstimator() 
{
-    return new AvroRecordSizeEstimator(getSchemaHandler().getRequiredSchema());
+  public SizeEstimator<BufferedRecord<IndexedRecord>> 
getRecordSizeEstimator(Option<Schema> recordSchemaOpt) {
+    return new 
AvroRecordSizeEstimator(recordSchemaOpt.orElse(getSchemaHandler().getRequiredSchema()));

Review Comment:
   yeah, it may work, but the change is still not necessary and also 
error-prone, for avro size estimation, the schema is already there, just 
calculating the schema size lazily should be fine already.



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