zanmato1984 commented on code in PR #37709:
URL: https://github.com/apache/arrow/pull/37709#discussion_r1683748446
##########
cpp/src/arrow/acero/swiss_join.cc:
##########
@@ -473,7 +474,7 @@ Status RowArrayMerge::PrepareForMerge(RowArray* target,
(*first_target_row_id)[sources.size()] = num_rows;
}
- if (num_bytes > std::numeric_limits<uint32_t>::max()) {
+ if (is_key_data && num_bytes > std::numeric_limits<uint32_t>::max()) {
Review Comment:
When letting non-key data that is greater than
`std::numeric_limits<uint32_t>::max()` bypass this check, the `num_bytes` will
underflow to a much smaller value in the `static_cast<uint32_t>` in #486. Then
the `target` won't allocate enough space, resulting in segfault when copying
data to target.
--
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]