Skip to content

Commit 07d7582

Browse files
committed
PR comments
1 parent 114edb2 commit 07d7582

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

cpp/src/arrow/compute/light_array_internal.cc

+3-7
Original file line numberDiff line numberDiff line change
@@ -611,13 +611,9 @@ Status ExecBatchBuilder::AppendSelected(const std::shared_ptr<ArrayData>& source
611611
});
612612
Visit(source, num_rows_to_append - num_rows_to_process, row_ids + num_rows_to_process,
613613
[&](int i, const uint8_t* ptr, int32_t num_bytes) {
614-
uint64_t* dst = reinterpret_cast<uint64_t*>(
615-
target->mutable_data(2) +
616-
offsets[num_rows_before + num_rows_to_process + i]);
617-
const uint64_t* src = reinterpret_cast<const uint64_t*>(ptr);
618-
uint8_t* dst_bytes = reinterpret_cast<uint8_t*>(dst);
619-
const uint8_t* src_bytes = reinterpret_cast<const uint8_t*>(src);
620-
memcpy(dst_bytes, src_bytes, num_bytes);
614+
auto dst = target->mutable_data(2) +
615+
offsets[num_rows_before + num_rows_to_process + i];
616+
memcpy(dst, ptr, num_bytes);
621617
});
622618
}
623619

cpp/src/arrow/compute/row/compare_internal.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ void KeyCompare::CompareVarBinaryColumnToRowHelper(
282282
result_or |= tail_mask & (key_left ^ key_right);
283283
}
284284
int result = result_or == 0 ? 0xff : 0;
285-
result = (length_left == length_right) ? result : 0;
285+
result *= (length_left == length_right ? 1 : 0);
286286
match_bytevector[i] = result;
287287
}
288288
}

0 commit comments

Comments
 (0)