alamb opened a new pull request, #9114: URL: https://github.com/apache/arrow-datafusion/pull/9114
## Which issue does this PR close? Part of https://github.com/apache/arrow-datafusion/issues/8045 ## Rationale for this change While working on implementing `ArrayToString` in https://github.com/apache/arrow-datafusion/pull/9113 I found that many of the array functions support arbitrary combinations of arguments that are `ColumnarValue` to `Array` by converting all the arguments to arrays and then calling a function that works on arrays. I think this is a common desire when implementing functions, but it is not always clear how to do this. For example I think @Omega359 had to implement the same basic thing in `to_date` in https://github.com/apache/arrow-datafusion/pull/9040 @viirya added a helper in https://github.com/apache/arrow-datafusion/pull/8962 which improves the situation, but I think this function may be hard to find (it is in `datafusion_physical_expr`) and it doesn't handle the case where the arguments are a mix of `ColumnarValue::Scalar` and `ColumnarValue::Array` ## What changes are included in this PR? 1. Move logic to `ColumnarValue::values_to_arrays` 2. Support mixed Scalar + ColumnarValues 3. Add documentation 4. Add unit tests 5. Deprecate the old function `columnar_values_to_array` ## Are these changes tested? Yes, new tests ## Are there any user-facing changes? New function, better docs and tests -- 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]
