KHARSHAVARDHAN-eng opened a new pull request, #50651:
URL: https://github.com/apache/arrow/pull/50651

   ### Rationale for this change
   
   Building Apache Arrow on macOS using older LLVM `libc++` toolchains (such as 
Xcode 12.5 shipped with the macOS 11.3 SDK) fails when compiling the 
`vector_sort` compute kernel due to unsupported `std::span` range constructors.
   
   ### What changes are included in this PR?
   
   In `cpp/src/arrow/compute/kernels/vector_sort_internal.h`:
   
   - In `NonStablePartitioner` & `StablePartitioner`: Replaced non-conforming 
`std::span<uint64_t>{middle, indices.data() + indices.size()}` with 
`indices.subspan(middle - indices.data())`.
   - In `ChunkedMergeImpl::MergeNullsAtStart` & `MergeNullsAtEnd`: Replaced 
`std::span<CompressedChunkLocation>{left.overall_begin(), right.overall_end()}` 
with `std::span<CompressedChunkLocation>{left.overall_begin(), 
static_cast<size_t>(right.overall_end() - left.overall_begin())}`.
   
   Both `.subspan(offset)` and `std::span(pointer, size_type)` are standard 
C++20 and supported on older macOS libc++ implementations.
   
   ### Verification
   
   - Built affected compute targets successfully.
   - Built vector sort tests successfully.
   - Verified the diff only contains the intended changes.
   
   Closes #50636


-- 
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]

Reply via email to