[ 
https://issues.apache.org/jira/browse/SPARK-28333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dongjoon Hyun resolved SPARK-28333.
-----------------------------------
    Resolution: Won't Do

Please see the discussion and review comments on the PR.

> NULLS FIRST for DESC and NULLS LAST for ASC
> -------------------------------------------
>
>                 Key: SPARK-28333
>                 URL: https://issues.apache.org/jira/browse/SPARK-28333
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> {code:sql}
> spark-sql> create or replace temporary view t1 as select * from (values(1), 
> (2), (null), (3), (null)) as v (val);
> spark-sql> select * from t1 order by val asc;
> NULL
> NULL
> 1
> 2
> 3
> spark-sql> select * from t1 order by val desc;
> 3
> 2
> 1
> NULL
> NULL
> {code}
> {code:sql}
> postgres=# create or replace temporary view t1 as select * from (values(1), 
> (2), (null), (3), (null)) as v (val);
> CREATE VIEW
> postgres=# select * from t1 order by val asc;
>  val
> -----
>    1
>    2
>    3
> (5 rows)
> postgres=# select * from t1 order by val desc;
>  val
> -----
>    3
>    2
>    1
> (5 rows)
> {code}
> https://www.postgresql.org/docs/11/queries-order.html



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to