mihailoale-db opened a new pull request, #50582: URL: https://github.com/apache/spark/pull/50582
### What changes were proposed in this pull request? I propose that we disallow `SortOrder` expressions under non-`Sort` operators. ### Why are the changes needed? Following Dataframe program throw an internal error: ``` val df = sql("SELECT 1 AS name") df.select(desc("name")) ``` In this PR we fix is so we throw a more user friendly one. ### Does this PR introduce _any_ user-facing change? Different (more user friendly) error is thrown. ### How was this patch tested? Added test. ### Was this patch authored or co-authored using generative AI tooling? 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org