Skip to content

GH-49677 [Python][C++][Compute] Add search sorted compute kernel#49679

Open
Alex-PLACET wants to merge 8 commits intoapache:mainfrom
Alex-PLACET:add_search_sorted_compute_kernel
Open

GH-49677 [Python][C++][Compute] Add search sorted compute kernel#49679
Alex-PLACET wants to merge 8 commits intoapache:mainfrom
Alex-PLACET:add_search_sorted_compute_kernel

Conversation

@Alex-PLACET
Copy link
Copy Markdown

@Alex-PLACET Alex-PLACET commented Apr 7, 2026

Rationale for this change

Add the implemenation of the search sorted compute kernel based on the numpy function: https://numpy.org/doc/stable/reference/generated/numpy.searchsorted.html

What changes are included in this PR?

Implementation of the C++ kernel + Python API.
Tests in C++ and Python

Are these changes tested?

Yes

Are there any user-facing changes?

No breaking change

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

⚠️ GitHub issue #49677 has been automatically assigned in GitHub to PR creator.

- Added a new benchmark file `vector_search_sorted_benchmark.cc` to evaluate the performance of the SearchSorted function for various data types including Int64, String, and Binary.
- Created a comprehensive test suite in `vector_search_sorted_test.cc` to validate the correctness of SearchSorted across different scenarios, including handling of null values, scalar needles, and run-end encoded arrays.
- Ensured that the benchmarks cover both left and right search options, as well as edge cases like empty arrays and arrays with leading/trailing nulls.
…lize ranges for leading/trailing null counts
@Alex-PLACET Alex-PLACET force-pushed the add_search_sorted_compute_kernel branch from 8e09ea3 to 4ec630e Compare April 8, 2026 08:15
Comment on lines +53 to +58
[
0,
0,
3,
5
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[
0,
0,
3,
5
]
[
0,
0,
3,
5
]

@Alex-PLACET just noticing that the elements here require two space chars to be removed. Similarly for the next two example outputs.

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants