[ https://issues.apache.org/jira/browse/TRAFODION-2117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15408168#comment-15408168 ]
ASF GitHub Bot commented on TRAFODION-2117: ------------------------------------------- Github user DaveBirdsall commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/639#discussion_r73564989 --- 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) + { + *CmpCommon::diags() << DgSqlCode(-3022) // ## INTERSECT not yet supported --- End diff -- Comment should say EXCEPT (you can fix it on a later check-in) > add support of SQL extension 'EXCEPT' > -------------------------------------- > > Key: TRAFODION-2117 > URL: https://issues.apache.org/jira/browse/TRAFODION-2117 > Project: Apache Trafodion > Issue Type: New Feature > Reporter: liu ming > Assignee: liu ming > > add syntax and basic functional support for 'EXCEPT', meet the requirement to > run TPCDS as initial goal. -- This message was sent by Atlassian JIRA (v6.3.4#6332)