hudi-agent commented on code in PR #19022:
URL: https://github.com/apache/hudi/pull/19022#discussion_r3425110543
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/partitioner/profile/DeltaWriteProfile.java:
##########
@@ -93,7 +90,7 @@ protected List<SmallFile> smallFilesProfile(String
partitionPath) {
@Override
protected long averageBytesPerRecord() {
- long avgSize = config.getCopyOnWriteRecordSizeEstimate();
+ long avgSize = this.avgSize > 0 ? this.avgSize :
config.getCopyOnWriteRecordSizeEstimate();
Review Comment:
🤖 nit: the `this.avgSize > 0 ? this.avgSize :
config.getCopyOnWriteRecordSizeEstimate()` initializer is now identical in both
`WriteProfile.averageBytesPerRecord()` and here — could you pull it into a
small protected helper on `WriteProfile` (e.g. `initialAvgSizeEstimate()`) so
the two overrides stay in sync if the fallback logic ever changes?
<sub><i>- AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
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]