taepper opened a new pull request, #51212: URL: https://github.com/apache/arrow/pull/51212
### Rationale for this change This fixes possible crashes of `SelectKUnstable` if inputs were empty ### What changes are included in this PR? This includes the bug fix and test cases which cover the broken prior behavior. ### Are these changes tested? Yes. ### Are there any user-facing changes? **This PR contains a "Critical Fix".**: (c) a bug that causes a crash If `SelectKUnstable` is called on an empty table or chunked-array the process terminates with the exception `std::bad_variant_access`. Through python, the wrapping of the (invalid) Datum in a python object already fails with the following error message: ``` ValueError: Unable to wrap Datum in a Python object ``` -- 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]
