Jefffrey opened a new issue, #18458: URL: https://github.com/apache/datafusion/issues/18458
### Is your feature request related to a problem or challenge? Current array_slice implementation assumes the from/to/stride arguments come from arrays which may vary per row; however I'd assume most cases we actually have scalar values for those arguments in which case we can take a fast path. ### Describe the solution you'd like For example in here: https://github.com/apache/datafusion/blob/9238779f45418e07108079aeef3b51de85e9fb8f/datafusion/functions-nested/src/extract.rs#L456-L470 If we know from the scalar from/to/stride that the slice is either empty or contiguous, we can avoid recreating the child array as no shuffling is needed; only in cases where the stride is > 1 or if its a reverse slice would we need to actually shuffle child array data. ### Describe alternatives you've considered _No response_ ### Additional context Probably makes more sense to do this after the refactoring done by #18432 -- 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]
