David Wayne Birdsall created TRAFODION-2843:
-----------------------------------------------

             Summary: Internal error (or core) on full outer join on an 
aggregate
                 Key: TRAFODION-2843
                 URL: https://issues.apache.org/jira/browse/TRAFODION-2843
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-cmp
    Affects Versions: 2.3-incubating
         Environment: All
            Reporter: David Wayne Birdsall
            Assignee: David Wayne Birdsall


The following sqlci script demonstrates the problem. The "prepare x1" fails 
with an error 7000 (generator internal error) on release builds, and cores on 
debug builds.

?section setup

drop schema if exists mytest cascade;
create schema if not exists mytest;
set schema mytest;

Create table D03s
                (
                pk int not null not droppable primary key
                , val01 int
                , val02 int
                );

Create table F01s
                (
                  pk int not null not droppable primary key
                , fk_d01 int not null
                , fk_d02 int not null
                , fk_d03 int not null
                , fk_d04 int not null
                , fk_d05 int not null
                , fk_d06 int not null
                , fk_d07 int not null
                , fk_d08 int not null
                , fk_d09 int not null
                , fk_d10 int not null
                , val01 int
                , val02 int
                , val01_d01 int
                , val02_d01 int
                , val01_d02 int
                , val02_d02 int
                , val01_d03 int
                , val02_d03 int
                ) salt using 8 partitions;

insert into D03s
                select c1+c2*10+c3*100, c1, c1+c2*10
                from (values(1)) T
                transpose 0,1 as c1
                transpose 0,1 as c2
                transpose 0,1 as c3;

insert with no rollback into F01s
                select c1+c2*10+c3*100+c4*1000+c5*10000+c6*100000
                      ,c1
                      ,c1+c2*10
                      ,c1+c2*10+c3*100
                      ,c1
                      ,c1+c2*10
                      ,c1+c2*10+c3*100
                      ,c1
                      ,c1+c2*10
                      ,c1+c2*10+c3*100
                      ,c1
                      ,c1+c2*10
                      ,mod(c1+c2*100+c3*100,200)
                      ,mod(c1,3)
                      ,mod(c1,6)
                      ,mod(c1+c2*10,5)
                      ,c1
                      ,c1
                      ,c1+c2*10
                from (values(1)) T
                transpose 0,1 as c1
                transpose 0,1 as c2
                transpose 0,1 as c3
                transpose 0,1 as c4
                transpose 0 as c5
                transpose 0 as c6
                ;

?section testit

set schema mytest;

prepare x1 from
                        select F01s.val01, TD03.val01
                        From F01s 
                        full outer join
                          (select D03s.val01,count(D03s.pk)
                          from D03s
                          group by D03s.val01) as TD03(val01,pk) 
                        on (TD03.pk=F01s.fk_d03
                          AND TD03.pk>0 );



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to