gszadovszky commented on a change in pull request #922:
URL: https://github.com/apache/parquet-mr/pull/922#discussion_r687017605



##########
File path: 
parquet-column/src/main/java/org/apache/parquet/column/impl/ColumnWriteStoreBase.java
##########
@@ -237,10 +237,11 @@ private void sizeCheck() {
       } else {
         rowCountForNextRowCountCheck = min(rowCountForNextRowCountCheck, 
writer.getRowsWrittenSoFar() + pageRowCountLimit);
       }
+      //estimate remaining row count by previous input for next row count check
       long rowsToFillPage =
           usedMem == 0 ?
               props.getMaxRowCountForPageSizeCheck()
-              : (long) rows / usedMem * remainingMem;
+              : rows * remainingMem / usedMem;

Review comment:
       I've felt it as a low risk. We are talking about pages here so neither 
the row count nor the used memory should be too high that this would overflow.




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