Skip to content

Commit

Permalink
PARQUET-2073: Fix estimate remaining row count in ColumnWriteStoreBas…
Browse files Browse the repository at this point in the history
…e. (#922)
  • Loading branch information
Ted-Jiang authored Aug 16, 2021
1 parent cc1ae9f commit 5154d04
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
if (rowsToFillPage < minRecordToWait) {
minRecordToWait = rowsToFillPage;
}
Expand Down

0 comments on commit 5154d04

Please sign in to comment.