You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Shivu Sondur (JIRA)" <ji...@apache.org> on 2019/07/13 04:52:00 UTC

[jira] [Commented] (SPARK-28333) NULLS FIRST for DESC and NULLS LAST for ASC

    [ https://issues.apache.org/jira/browse/SPARK-28333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16884292#comment-16884292 ] 

Shivu Sondur commented on SPARK-28333:
--------------------------------------

[~yumwang]

i am working on this

> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org