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 #639: [TRAFODION-2117] add SQL support of E...
Date Fri, 05 Aug 2016 22:31:29 GMT
Github user sureshsubbiah commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/639#discussion_r73768646
  
    --- Diff: core/sql/optimizer/BindRelExpr.cpp ---
    @@ -3035,6 +3035,98 @@ RelExpr *Intersect::bindNode(BindWA *bindWA)
     // LCOV_EXCL_STOP
     
     // -----------------------------------------------------------------------
    +// member functions for class Except 
    +// -----------------------------------------------------------------------
    +
    +// LCOV_EXCL_START - cnu
    +RelExpr *Except::bindNode(BindWA *bindWA)
    +{
    +  if (nodeIsBound())
    +  {
    +    bindWA->getCurrentScope()->setRETDesc(getRETDesc());
    +    return this;
    +  }
    +
    +  // Bind the child nodes.
    +  //
    +  bindChildren(bindWA);
    +  if (bindWA->errStatus()) return this;
    +
    +  // Check that there are an equal number of select items on both sides.
    +  //
    +  const RETDesc &leftTable = *child(0)->getRETDesc();
    +  const RETDesc &rightTable = *child(1)->getRETDesc();
    +  if (leftTable.getDegree() != rightTable.getDegree()) {
    +    // 4014 The operands of an intersect must be of equal degree.
    +    *CmpCommon::diags() << DgSqlCode(-4014);
    +    bindWA->setErrStatus();
    +    return this;
    +  }
    +
    +  // Join the columns of both sides. 
    +  //
    +  if(CmpCommon::getDefault(MODE_SPECIAL_4) != DF_ON)
    --- End diff --
    
    I forget now, why is this guarded by MODE_SPECIAL_4 ?


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