Krishnanand-G opened a new pull request, #50858: URL: https://github.com/apache/arrow/pull/50858
### Rationale for this change `ArraySpan::SetSlice` replaces the offset. `pairwise_diff` copied the input span and then sliced from `left_start`/`right_start`, so a sliced array was read from the parent buffer. With `[99, 1, 4, 9, 16]` sliced to `[1, 4, 9, 16]`, period=1 produced `[-98, 3, 5, 7]` instead of `[null, 3, 5, 7]`. ### What changes are included in this PR? The kernel passes `input.offset + left_start` (and the same for the right side). The regression test uses a sliced int64 array for both period signs, on `pairwise_diff` and `pairwise_diff_checked`. ### Are these changes tested? Yes, `TestPairwiseDiff.SlicedInput` in `vector_pairwise_test.cc`. ### Are there any user-facing changes? `pairwise_diff` on a sliced array now diffs the sliced values. Callers who passed a slice and got parent-buffer values will see different (correct) output. * GitHub Issue: #50524 -- 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]
