2010YOUY01 opened a new issue, #18159: URL: https://github.com/apache/datafusion/issues/18159
### Describe the bug The `ScalarValue::to_array_of_size()` API is repeating a scalar value k times and convert it into a array of length `k`. For `ScalarValue::List` type, now it's doing deep copy for the `List` element. This can be inefficient if the `List` is long or the target array size is long. See the `List` implementation in https://github.com/apache/datafusion/blob/35b2e359f6703dedc6bf8ced3f0699d8a885d4df/datafusion/common/src/scalar/mod.rs#L2877 This caused performance regression in https://github.com/apache/datafusion/issues/18070 ### To Reproduce It can be verified easier by checking the implementation. ### Expected behavior _No response_ ### Additional context _No response_ -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
