rdtr opened a new pull request, #13189: URL: https://github.com/apache/gluten/pull/13189
## What changes are proposed in this pull request? This takes over #12661 by @Smallfu666, which revived #12095 by @surendralilhore. Both were closed as stale without a review. Spark represents `array_sort(array)` with a generated null-aware default comparator. Gluten passes it to Velox as a lambda, which Velox can't handle, so the projection falls back to Spark. When the lambda is semantically equal to Spark's default comparator (`ArraySort.comparator`), this PR passes only the array, so that Velox uses its native one-argument `array_sort`. Custom comparators keep the two-argument path. Fixes #12094 ## How was this patch tested? `MiscOperatorSuite."array_sort with default comparator"` covers integer arrays with null elements, an empty array, a null array, a double array with NaN, and a custom comparator. It passes on Spark 4.1, and fails without the change because the projection falls back. `ArraySort.comparator` exists in Spark 3.4 and 3.5 too. ## Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) -- 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]
