You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Atanu Mishra (JIRA)" <ji...@apache.org> on 2015/08/14 01:04:46 UTC

[jira] [Closed] (TRAFODION-122) LP Bug: 1229454 - ORDER BY has no effect on primary key(s)

     [ https://issues.apache.org/jira/browse/TRAFODION-122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Atanu Mishra closed TRAFODION-122.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 0.8 (pre-incubation)

> LP Bug: 1229454 - ORDER BY has no effect on primary key(s)
> ----------------------------------------------------------
>
>                 Key: TRAFODION-122
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-122
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-general
>            Reporter: Weishiun Tsai
>            Assignee: Hans Zeller
>            Priority: Critical
>             Fix For: 0.8 (pre-incubation)
>
>
> ORDER BY has no effect on primary key(s).  As shown in the following example, a non-primary key column b can be ordered, but the order of the records does not change if using the primary key a as the order by column.  The build is an open source build topl-hegdean-datalake_64_1-20130910.1_release.tar.  The instance runs on a workstation.
> >>cqd mode_seabase 'on';
> --- SQL operation complete.
> >>set schema seabase.phoenix;
> --- SQL operation complete.
> >>create table t1 (a int not null not droppable primary key, b int);
> --- SQL operation complete.
> >>insert into t1 values (3, 3);
> --- 1 row(s) inserted.
> >>insert into t1 values (2, 2);
> --- 1 row(s) inserted.
> >>insert into t1 values (1, 1);
> --- 1 row(s) inserted.
> >>select * from t1 order by b desc;
> A            B
> -----------  -----------
>           3            3
>           2            2
>           1            1
> --- 3 row(s) selected.
> >>select * from t1 order by a desc;
> A            B
> -----------  -----------
>           1            1
>           2            2
>           3            3
> --- 3 row(s) selected.



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