jonahgao opened a new pull request, #10547: URL: https://github.com/apache/datafusion/pull/10547
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> Closes #10425. ## Rationale for this change Note: Negative `from` or `to` implies counting from the end of the list and both are standardized to the corresponding positive index. When `from` is greater than `to` and `stride` is a positive, the following loop becomes infinite, until the `index` becomes excessively large and panics. https://github.com/apache/datafusion/blob/842f3933e3496a022984c2a37254475a3bcde1bf/datafusion/functions-array/src/extract.rs#L468-L478 The fix is to return an empty list directly in this situation. ## What changes are included in this PR? Fix panic. <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> ## Are these changes tested? Yes ## Are there any user-facing changes? No -- 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]
