You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:14:28 UTC

[jira] [Created] (TRAFODION-169) LP Bug: 1272095 - [any N] does not have any effect on a particular query

Alice Chen created TRAFODION-169:
------------------------------------

             Summary: LP Bug: 1272095 - [any N] does not have any effect on a particular query
                 Key: TRAFODION-169
                 URL: https://issues.apache.org/jira/browse/TRAFODION-169
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-exe
            Reporter: Weishiun Tsai
            Assignee: Anoop Sharma
            Priority: Critical


With this particular query, [any N] does not have any effect. As shown in the following output, [any 1] still returns 4 rows, while [first 1] works fine and returns only 1 row.



This is seen on the beta build trafodion-ci-release-trafodion_beta-20140117-v36857_release.tar installed on a workstation.



>>create table t (large_int LARGEINT not null not droppable, pic_252 PIC X(246) not null not droppable, pic_1 PIC X not null not droppable, PRIMARY KEY (large_int DESC) not droppable);



--- SQL operation complete.

>>insert into t values (3000,'george','D'),(100,'carltons','E'),(1000,'harveys','B'),(300,'Q','X'),(2000,'alexander','B'),(400,'joseph','X'),(200,'squaw','X'),(4000,'valley','D');



--- 8 row(s) inserted.

>>select pic_1,large_int

from t

where large_int >= 100

group by pic_1,large_int

having large_int in (100,200,1000,2000)

order by pic_1,large_int;+>+>+>+>+>



PIC_1 LARGE_INT

----- --------------------



B 1000

B 2000

E 100

X 200



--- 4 row(s) selected.

>>select [any 1] pic_1,large_int

from t

where large_int >= 100

group by pic_1,large_int

having large_int in (100,200,1000,2000)

order by pic_1,large_int;+>+>+>+>+>



PIC_1 LARGE_INT

----- --------------------



B 1000

B 2000

E 100

X 200



--- 4 row(s) selected.

>>select [first 1] pic_1,large_int

from t

where large_int >= 100

group by pic_1,large_int

having large_int in (100,200,1000,2000)

order by pic_1,large_int;+>+>+>+>+>



PIC_1 LARGE_INT

----- --------------------



B 1000



--- 1 row(s) selected.



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