File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments