You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2014/07/08 19:10:04 UTC
[jira] [Updated] (PHOENIX-1064) Change default of ORDER BY so that
nulls sort last
[ https://issues.apache.org/jira/browse/PHOENIX-1064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Taylor updated PHOENIX-1064:
----------------------------------
Fix Version/s: 5.0.0
Summary: Change default of ORDER BY so that nulls sort last (was: In order by case, I think nulls last will be default)
Nulls sort first in Phoenix by design. If we're going to change this, we'd need to do this at a major release due to the change in behavior and how it would affect backward compatibility.
> Change default of ORDER BY so that nulls sort last
> --------------------------------------------------
>
> Key: PHOENIX-1064
> URL: https://issues.apache.org/jira/browse/PHOENIX-1064
> Project: Phoenix
> Issue Type: New Feature
> Reporter: jay wong
> Fix For: 5.0.0
>
> Attachments: PHOENIX-1064.patch
>
>
> 1. jdbc:phoenix:ip:/hbase-phoenix-l> select * from testorder;
> | PK1 | COL1 | COL2 |
> | row1 | 2 | 3 |
> | row2 | 3 | 4 |
> | row3 | 4 | 5 |
> | row4 | 5 | null |
> | row5 | 5 | null |
> 2.jdbc:phoenix:ip:/hbase-phoenix-l> select * from testorder order by col2;
> | PK1 | COL1 | COL2 |
> | row4 | 5 | null |
> | row5 | 5 | null |
> | row1 | 2 | 3 |
> | row2 | 3 | 4 |
> | row3 | 4 | 5 |
> 3. jdbc:phoenix:ip:/hbase-phoenix-l> select * from testorder order by col2 desc;
> | PK1 | COL1 | COL2 |
> | row4 | 5 | null |
> | row5 | 5 | null |
> | row3 | 4 | 5 |
> | row2 | 3 | 4 |
> | row1 | 2 | 3 |
> I think it will be at last when the column is null as default
> As mysql or oracle DB is at last.
> It is More in line with normal logic of thinking.
--
This message was sent by Atlassian JIRA
(v6.2#6252)