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


##########
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:
   we don't really need this, like the changes in this PR: 
https://github.com/apache/hudi/pull/13896/files, just support multiple schemas 
in `AvroRecordSizeEstimator`, and actually passing a explicitly schema does not 
work because for COW threre are always two schemas: one with meta fields and 
one without.



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