[
https://issues.apache.org/jira/browse/TRAFODION-2983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16390484#comment-16390484
]
ASF GitHub Bot commented on TRAFODION-2983:
-------------------------------------------
GitHub user DaveBirdsall opened a pull request:
https://github.com/apache/trafodion/pull/1465
[TRAFODION-2983] Be careful to preserve inputs needed for output computation
This fix changes GroupByAgg::tryToPullUpPredicatesInPreCodeGen
(optimizer/RelExpr.cpp) to make sure that characteristic inputs needed to
calculate characteristic output expressions are not removed.
It also makes a small improvement to some ValueId Equivalence Group (VEG)
debugging code.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/DaveBirdsall/trafodion Trafodion2983
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafodion/pull/1465.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1465
----
commit 3375ecb3ece47f5d883d1d81608740589f3fc809
Author: Dave Birdsall <dbirdsall@...>
Date: 2018-03-08T00:05:45Z
[TRAFODION-2983] Be careful to preserve inputs needed for output computation
----
> Query fails with an internal error in the generator
> ---------------------------------------------------
>
> Key: TRAFODION-2983
> URL: https://issues.apache.org/jira/browse/TRAFODION-2983
> 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 reproduces the problem:
> {quote}?section setup
> drop table if exists t1;
> drop table if exists t2;
> drop table if exists t3;
> create table t1
> (
> id1 varchar(50 bytes) no default not null not droppable not serialized
> , yn varchar(1 byte) default null not serialized
> )
> attributes aligned format
> ;
> create unique index t1pk ON t1
> (
> id1 asc
> )
> attributes aligned format
> ;
> create table t2
> (
> id1 varchar(50 bytes) no default not null not droppable not serialized
> , id3 varchar(50 bytes) no default not null not droppable not serialized
> , id2 varchar(4 bytes) default null not serialized
> , c1 varchar(50 bytes) default null not serialized
> )
> attributes aligned format
> ;
> create unique index t2pk ON t2
> (
> id1 asc
> , id3 asc
> )
> attributes aligned format
> ;
>
> create table t3
> (
> id2 varchar(50 bytes) no default not null not droppable not serialized
> , nm varchar(100 bytes) no default not null not droppable not serialized
> )
> attributes aligned format
> ;
> ?section s1
> -- reproduces the error
> prepare s1 from
> select t1.id1,
> t2.c1,
> decode(t1.yn, 'Y', (select t3.nm
> from t3
> where t3.id2 = t2.id2),
> 'N') yn
> from t1
> left outer join t2
> on t2.id1 = t1.id1
> where t1.id1 = 'this is a dummy ID string';
> {quote}
> When run, the PREPARE fails with an internal error in the generator, 7000.
> (On debug builds, it fails with a core.)
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)