trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traflm <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #639: [TRAFODION-2117] add SQL support of E...
Date Sat, 06 Aug 2016 02:59:35 GMT
Github user traflm commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/639#discussion_r73779753
  
    --- 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 --
    
    this is not required, but new features not well QAed, I think it is easier to be adopted
if protected by CQD :-)
    After QA tested, we can externalize all these new features: INTERSECT and EXCEPT


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