diff --git a/cpp/velox/shuffle/VeloxSortShuffleWriter.cc b/cpp/velox/shuffle/VeloxSortShuffleWriter.cc index cb81ea5f6c8a..4a7a403484cd 100644 --- a/cpp/velox/shuffle/VeloxSortShuffleWriter.cc +++ b/cpp/velox/shuffle/VeloxSortShuffleWriter.cc @@ -278,7 +278,7 @@ uint32_t VeloxSortShuffleWriter::maxRowsToInsert(uint32_t offset, uint32_t rows) } void VeloxSortShuffleWriter::acquireNewBuffer(int64_t memLimit, uint64_t minSizeRequired) { - auto size = std::max(std::min((uint64_t)memLimit >> 2, 64UL * 1024 * 1024), minSizeRequired); + auto size = std::max(std::min(memLimit >> 2, 64UL * 1024 * 1024), minSizeRequired); // Allocating new buffer can trigger spill. auto newBuffer = facebook::velox::AlignedBuffer::allocate(size, veloxPool_.get(), 0); pages_.emplace_back(std::move(newBuffer));