diff --git a/c++/src/Reader.cc b/c++/src/Reader.cc index 542eda5c9e2..2cfd6417c5b 100644 --- a/c++/src/Reader.cc +++ b/c++/src/Reader.cc @@ -1407,7 +1407,7 @@ namespace orc { * @return Id of the RowGroup that the row belongs to */ int RowReaderImpl::computeRGIdx(uint64_t rowIndexStride, long rowIdx) { - return rowIndexStride == 0 ? 0 : static_cast(rowIdx / static_cast(rowIndexStride)); + return rowIndexStride == 0 ? 0 : (int)(rowIdx / rowIndexStride); } /**