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:17:27 UTC

[jira] [Created] (TRAFODION-585) LP Bug: 1361754 - query plan missing sort operator

Alice Chen created TRAFODION-585:
------------------------------------

             Summary: LP Bug: 1361754 - query plan missing sort operator
                 Key: TRAFODION-585
                 URL: https://issues.apache.org/jira/browse/TRAFODION-585
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-cmp
            Reporter: Apache Trafodion
            Assignee: Qifan Chen


the query plan generated for a load query that loads data  from a table with primary key that has ascendant modifier into a table where the same key has descending modifiers does not add the sort operator and assume the data is already sorted correctly 



this issue can be reproduced with below steps and it seems like an optimizer issue:
 -------------------------------------------------
  cqd comp_bool_226 'on';
  set schema mytest2;

create table t_asc (a int not null, b int not null, primary key (a asc, b asc));
 create table t_desc (a int not null, b int not null, primary key (a asc, b desc));
 insert into t_asc values (1,1),(2,2),(3,3),(4,4);
  insert into t_asc values (2,3);
  prepare s from load transform into t_desc select * from t_asc;
 explain options 'f' s;
 execute s;
 ---------------



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