GitHub user xwu0226 opened a pull request:

    https://github.com/apache/spark/pull/14842

    [SPARK-10747][SQL] Support NULS FIRST|LAST clause in ORDER BY

    ## What changes were proposed in this pull request?
    Currently, ORDER BY clause returns nulls value according to sorting order 
(ASC|DESC), considering null value is always smaller than non-null values. 
    However, SQL2003 standard support NULLS FIRST or NULLS LAST to allow users 
to specify whether null values should be returned first or last, regardless of 
sorting order (ASC|DESC). 
    
    This PR is to support this new feature. 
    
    
    ## How was this patch tested?
    New test cases are added to test NULLS FIRST|LAST for regular select 
queries and windowing queries. 
    
    (If this patch involves UI changes, please attach a screenshot; otherwise, 
remove this)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/xwu0226/spark SPARK-10747

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/14842.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #14842
    
----
commit 91e40fdecbc2493f1c98b8d49a6ae1b70850ea5f
Author: Xin Wu <xi...@us.ibm.com>
Date:   2016-08-18T16:48:59Z

    initial change

commit f3fbc8810d81903c874b7416232df565496239d6
Author: Xin Wu <xi...@us.ibm.com>
Date:   2016-08-18T22:48:49Z

    SPARK-10747: support NULLS FIRST|LAST in ORDER BY clause

commit 7dd8da23cd81ad0c85d681a667e69536e2c18b55
Author: Xin Wu <xi...@us.ibm.com>
Date:   2016-08-19T19:38:17Z

    SPARK-10747: add testcases

commit f8f2b82643948c5a5bcd5947889052e8fd066d95
Author: Xin Wu <xi...@us.ibm.com>
Date:   2016-08-20T04:10:37Z

    SPARK-10747: update testcases

commit a8689e0a0ebc77f625489f7154099a129b6b0283
Author: Xin Wu <xi...@us.ibm.com>
Date:   2016-08-26T17:59:20Z

    SPARK-10747: prefix comparator enhancement to support nulls last/first

commit 267159bbd4d5a4bd1dcf919572cc197032c549a4
Author: Xin Wu <xi...@us.ibm.com>
Date:   2016-08-27T02:20:38Z

    SPARK-10747: refine prefix comparator

commit 760e890b7ca43070dff1f5df4173750ed65454a1
Author: Xin Wu <xi...@us.ibm.com>
Date:   2016-08-27T04:06:46Z

    SPARK-10747: add testcases

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to