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

ASF GitHub Bot commented on TAJO-1972:
--------------------------------------

GitHub user jihoonson opened a pull request:

    https://github.com/apache/tajo/pull/857

    TAJO-1972: Invalid sort order with NULLS FIRST|LAST

    

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

    $ git pull https://github.com/jihoonson/tajo-2 TAJO-1972

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

    https://github.com/apache/tajo/pull/857.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 #857
    
----
commit 6c0ed3f3d4accb3342f2adf5a7b780902f59404b
Author: Jihoon Son <[email protected]>
Date:   2015-11-09T05:24:02Z

    Fix sort order

----


> Invalid sort order with NULLS FIRST|LAST 
> -----------------------------------------
>
>                 Key: TAJO-1972
>                 URL: https://issues.apache.org/jira/browse/TAJO-1972
>             Project: Tajo
>          Issue Type: Bug
>            Reporter: Jihoon Son
>            Assignee: Jihoon Son
>            Priority: Critical
>             Fix For: 0.11.1
>
>
> Currently, the order of nulls is affected by the sort order (asc and desc), 
> but should not. Here is the example of pgsql's behaviour.
> {noformat}
> postgres=# select * from test;
>  id | name  
> ----+-------
>   0 | test1
>   1 | 
>     | test2
> (3 rows)
> postgres=# select * from test order by id  asc nulls first;
>  id | name  
> ----+-------
>     | test2
>   0 | test1
>   1 | 
> (3 rows)
> postgres=# select * from test order by id  desc nulls first;
>  id | name  
> ----+-------
>     | test2
>   1 | 
>   0 | test1
> (3 rows)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to