wankunde commented on code in PR #2371:
URL: https://github.com/apache/orc/pull/2371#discussion_r2321162659
##########
java/core/src/java/org/apache/orc/impl/WriterImpl.java:
##########
@@ -325,9 +327,9 @@ public boolean checkMemory(double newScale) throws
IOException {
}
private boolean checkMemory() throws IOException {
- if (rowsSinceCheck >= ROWS_PER_CHECK) {
+ long size = treeWriter.estimateMemory();
Review Comment:
* If rowsSinceCheck >= ROWS_PER_CHECK, the `estimateMemory` will be called
the same as before
* If rowsSinceCheck < ROWS_PER_CHECK, the `estimateMemory` will be called
`ROWS_PER_CHECK / VectorizedRowBatch.size` times, and `5000 / 1024 = 4` times
by default, I think this is much smaller overhead in the overall computation.
--
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]