You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Majid Hajiheidari (Jira)" <ji...@apache.org> on 2023/12/12 20:21:00 UTC
[jira] [Commented] (SPARK-46349) Prevent Multiple SortOrders for an Expression
[ https://issues.apache.org/jira/browse/SPARK-46349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17795922#comment-17795922 ]
Majid Hajiheidari commented on SPARK-46349:
-------------------------------------------
The PR was not working because it failed lots of test cases. Deleted the PR from the issue.
> Prevent Multiple SortOrders for an Expression
> ---------------------------------------------
>
> Key: SPARK-46349
> URL: https://issues.apache.org/jira/browse/SPARK-46349
> Project: Spark
> Issue Type: Bug
> Components: PySpark, SQL
> Affects Versions: 4.0.0
> Reporter: Majid Hajiheidari
> Priority: Minor
>
> Hello everyone,
> This is my first contribution to the project. I welcome any feedback and edits to improve this pull request.Currently, it's possible to create redundant sort expressions in both Scala and Python APIs, leading to potentially incorrect and confusing SQL statements. For example:
> Scala:
> {code:java}
> spark.range(10).orderBy($"id".desc.asc).show(){code}
> Python:
> {code:java}
> spark.range(10).orderBy(f.desc('id'), ascending=False).show(){code}
>
> Such usage generates SQL like order by id DESC NULLS LAST DESC NULLS LAST, causing non-descriptive error messages.
>
> I look forward to your feedback and thank you for considering this contribution.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org