Skip to content

Commit fcdefa3

Browse files
committed
Fix warning on Windows with libarrow 23
1 parent 7ca4b15 commit fcdefa3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ogr/ogrsf_frmts/parquet/ogrparquetlayer.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2971,8 +2971,8 @@ OGRErr OGRParquetLayer::SetNextByIndex(GIntBig nIndex)
29712971
m_iRecordBatch = 0;
29722972
for (int iGroup = 0; iGroup < nNumGroups; ++iGroup)
29732973
{
2974-
const int64_t nNextAccRows =
2975-
nAccRows + metadata->RowGroup(iGroup)->num_rows();
2974+
const auto nRowsInRowGroup = metadata->RowGroup(iGroup)->num_rows();
2975+
const int64_t nNextAccRows = nAccRows + nRowsInRowGroup;
29762976
if (nIndex < nNextAccRows)
29772977
{
29782978
if (!CreateRecordBatchReader(iGroup))
@@ -3010,8 +3010,7 @@ OGRErr OGRParquetLayer::SetNextByIndex(GIntBig nIndex)
30103010
}
30113011
nAccRows = nNextAccRows;
30123012
m_iRecordBatch +=
3013-
(metadata->RowGroup(iGroup)->num_rows() + nBatchSize - 1) /
3014-
nBatchSize;
3013+
static_cast<int>(cpl::div_round_up(nRowsInRowGroup, nBatchSize));
30153014
}
30163015

30173016
m_iRecordBatch = -1;

0 commit comments

Comments
 (0)