hililiwei commented on a change in pull request #3784:
URL: https://github.com/apache/iceberg/pull/3784#discussion_r833949422
##########
File path: orc/src/main/java/org/apache/iceberg/orc/OrcFileAppender.java
##########
@@ -66,6 +71,11 @@
this.metricsConfig = metricsConfig;
TypeDescription orcSchema = ORCSchemaUtil.convert(schema);
+
+ this.avgRowByteSize =
+ OrcSchemaVisitor.visitSchema(orcSchema, new
EstimateOrcAvgWidthVisitor()).stream().reduce(Integer::sum)
+ .orElse(0);
Review comment:
I initially set it to 1, but as long as the Schema has a field, it won't
be 0. Setting it to 1 might mask some exceptions. When the value is 0, we can
raise an WARN in the log.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]