Yuming Wang created SPARK-28333:
-----------------------------------
Summary: 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
{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.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]