trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sureshsubbiah <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #657: [TRAFODION-2159] Unnest correlated su...
Date Wed, 17 Aug 2016 21:56:18 GMT
Github user sureshsubbiah commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/657#discussion_r75215054
  
    --- Diff: core/sql/optimizer/NormRelExpr.cpp ---
    @@ -2436,15 +2449,21 @@ void Join::createAFilterGrandChildIfNeeded(NormWA & normWARef)
     
           if ((doNotUnnest == FALSE) && candidateForLeftJoin && 
               (CmpCommon::getDefault(SUBQUERY_UNNESTING_P2) != DF_INTERNAL) &&
    -          (normWARef.getLeftJoinConversionCount() >= 1))
    +          ((normWARef.getLeftJoinConversionCount() >= 1)||nestedAggInSubQ))
           {
             doNotUnnest = TRUE;
             // For phase 2 we only unnest 1 level of subqueries 
             // containing NonNullRejecting Predicates
     
    -        if (CmpCommon::getDefault(SUBQUERY_UNNESTING) == DF_DEBUG)
    +        if (CmpCommon::getDefault(SUBQUERY_UNNESTING) == DF_DEBUG) 
    +        {
    +          if (!nestedAggInSubQ)
                 *CmpCommon::diags() << DgSqlCode(2997)
                   << DgString1("Skipping unnesting of Subquery due to NonNullRejecting
Predicates in more than one subquery");
    +          else
    +             *CmpCommon::diags() << DgSqlCode(2997)
    +              << DgString1("Skipping unnesting of Subquery since we have both NonNullRejecting
predicate and nested nested aggregate in subquery.");
    --- End diff --
    
    Thanks for catching the typo, it is fixed now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message