[ 
https://issues.apache.org/jira/browse/TRAFODION-2969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16379101#comment-16379101
 ] 

ASF GitHub Bot commented on TRAFODION-2969:
-------------------------------------------

Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1454#discussion_r171021699
  
    --- Diff: core/sql/optimizer/RelExpr.cpp ---
    @@ -11388,8 +11388,9 @@ void RelRoot::setMvBindContext(MvBindContext * 
pMvBindContext)
       pMvBindContextForScope_ = pMvBindContext;
     }
     
    -void RelRoot::addOneRowAggregates(BindWA* bindWA)
    +NABoolean RelRoot::addOneRowAggregates(BindWA* bindWA, NABoolean 
forceGroupByAgg)
     {
    +  NABoolean GroupByAggNodeAdded = FALSE;
    --- End diff --
    
    Done; changed it to start with lower case letter


> 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)

Reply via email to