[
https://issues.apache.org/jira/browse/TRAFODION-2969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Wayne Birdsall updated TRAFODION-2969:
--------------------------------------------
Description:
The following script illustrates the error:
{quote}?section setup
CREATE TABLE subquery_table
(
x int no default not null,
y int,
primary key ( x )
);
CREATE TABLE main_table
(
a int no default not null,
b int,
primary key (a)
);
?section testit
prepare s1 from
select
(select [FIRST 1] y aa from subquery_table b where b.x = a.b) as company_id
from main_table a;
?section testit2
prepare s1 from
select
(select y aa from subquery_table b where b.x = a.b) as company_id
from main_table a;
{quote}
If we run section setup to create the tables, then run section testit, the
prepare fails with this error:
*
**
*** ERROR[2006] Internal error: assertion failure
(CmpCommon::getDefault(COMP_BOOL_137) == DF_ON) in file
../optimizer/NormItemExpr.cpp at line 6028.
The second query, in section testit2, on the other hand compiles and executes
just fine.
was:
The following script illustrates the error:
?section setup
CREATE TABLE subquery_table
(
x int no default not null,
y int,
primary key (x)
);
CREATE TABLE main_table
(
a int no default not null,
b int,
primary key (a)
);
?section testit
prepare s1 from
select
(select [FIRST 1] y aa from subquery_table b where b.x = a.b) as company_id
from main_table a;
?section testit2
prepare s1 from
select
(select y aa from subquery_table b where b.x = a.b) as company_id
from main_table a;
If we run section setup to create the tables, then run section testit, the
prepare fails with this error:
*** ERROR[2006] Internal error: assertion failure
(CmpCommon::getDefault(COMP_BOOL_137) == DF_ON) in file
../optimizer/NormItemExpr.cpp at line 6028.
The second query, in section testit2, on the other hand compiles and executes
just fine.
> Subquery with [first 1] in select list results in Normalizer internal error
> ---------------------------------------------------------------------------
>
> Key: TRAFODION-2969
> URL: https://issues.apache.org/jira/browse/TRAFODION-2969
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmp
> Affects Versions: 2.3
> Reporter: David Wayne Birdsall
> Assignee: David Wayne Birdsall
> Priority: Major
>
> The following script illustrates the error:
> {quote}?section setup
> CREATE TABLE subquery_table
> (
> x int no default not null,
> y int,
> primary key ( x )
> );
> CREATE TABLE main_table
> (
> a int no default not null,
> b int,
> primary key (a)
> );
> ?section testit
> prepare s1 from
> select
> (select [FIRST 1] y aa from subquery_table b where b.x = a.b) as company_id
> from main_table a;
> ?section testit2
> prepare s1 from
> select
> (select y aa from subquery_table b where b.x = a.b) as company_id
> from main_table a;
> {quote}
> If we run section setup to create the tables, then run section testit, the
> prepare fails with this error:
> *
> **
> *** ERROR[2006] Internal error: assertion failure
> (CmpCommon::getDefault(COMP_BOOL_137) == DF_ON) in file
> ../optimizer/NormItemExpr.cpp at line 6028.
> The second query, in section testit2, on the other hand compiles and executes
> just fine.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)