Skip to content
This repository was archived by the owner on Sep 2, 2024. It is now read-only.

Commit 7f561b6

Browse files
gszadovszkyrdblue
authored andcommitted
PARQUET-1414: Simplify next row count check calculation (apache#537)
1 parent ca294f9 commit 7f561b6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎parquet-column/src/main/java/org/apache/parquet/column/impl/ColumnWriteStoreBase.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ private void sizeCheck() {
200200
writer.writePage();
201201
remainingMem = props.getPageSizeThreshold();
202202
} else {
203-
rowCountForNextRowCountCheck = min(rowCountForNextRowCountCheck, rowCount + (pageRowCountLimit - rows));
203+
rowCountForNextRowCountCheck = min(rowCountForNextRowCountCheck, writer.getRowsWrittenSoFar() + pageRowCountLimit);
204204
}
205205
long rowsToFillPage =
206206
usedMem == 0 ?

0 commit comments

Comments
 (0)