zml1206 commented on code in PR #6593:
URL: https://github.com/apache/incubator-gluten/pull/6593#discussion_r1692242534
##########
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<uint64_t>(memLimit >> 2, 64UL * 1024 * 1024),
minSizeRequired);
Review Comment:
IIUC, memLimit should always be a positive number.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]