diff --git a/cpp/velox/shuffle/VeloxSortShuffleWriter.cc b/cpp/velox/shuffle/VeloxSortShuffleWriter.cc index e23dd2e7ed7fc..9f93b4ae9f300 100644 --- a/cpp/velox/shuffle/VeloxSortShuffleWriter.cc +++ b/cpp/velox/shuffle/VeloxSortShuffleWriter.cc @@ -203,7 +203,7 @@ void VeloxSortShuffleWriter::insertRows( // size(RowSize) | bytes memcpy(currentPage_ + pageCursor_, &rowSize_[row], sizeof(RowSizeType)); offsets[i] = pageCursor_ + sizeof(RowSizeType); - pageCursor_ += sizeof(RowSizeType) + rowSize_[row]; + pageCursor_ += rowSize_[row]; VELOX_DCHECK_LE(pageCursor_, currenPageSize_); } compact.serialize(indexRange, offsets, currentPage_);