zanmato1984 commented on code in PR #45336: URL: https://github.com/apache/arrow/pull/45336#discussion_r1926893882
########## cpp/src/arrow/acero/swiss_join.cc: ########## @@ -477,14 +477,15 @@ void RowArrayMerge::CopyFixedLength(RowTableImpl* target, const RowTableImpl& so const int64_t* source_rows_permutation) { int64_t num_source_rows = source.length(); - int64_t fixed_length = target->metadata().fixed_length; + uint32_t fixed_length = target->metadata().fixed_length; // Permutation of source rows is optional. Without permutation all that is // needed is memcpy. // if (!source_rows_permutation) { - memcpy(target->mutable_data(1) + fixed_length * first_target_row_id, source.data(1), - fixed_length * num_source_rows); + DCHECK_LE(first_target_row_id, std::numeric_limits<uint32_t>::max()); + memcpy(target->mutable_fixed_length_rows(static_cast<uint32_t>(first_target_row_id)), + source.fixed_length_rows(/*row_id=*/0), fixed_length * num_source_rows); } else { // Row length must be a multiple of 64-bits due to enforced alignment. Review Comment: Yes this is true. But IMHO this is acceptable because we also have other auxiliary data structures to aim the hash join so I wouldn't say this is very bad. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org