You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by GitBox <gi...@apache.org> on 2021/08/11 17:04:52 UTC

[GitHub] [parquet-mr] gszadovszky commented on a change in pull request #922: [PARQUET-2073] Fix estimate remaining row count in ColumnWriteStoreBase.

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 the 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: dev-unsubscribe@parquet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org