You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by sureshsubbiah <gi...@git.apache.org> on 2017/01/20 19:06:34 UTC

[GitHub] incubator-trafodion pull request #922: [TRAFODION-2438] Unnecessary and some...

GitHub user sureshsubbiah opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/922

    [TRAFODION-2438] Unnecessary and sometimes wrong delete during upsert\u2026

    \u2026/merge with IM
    
    This change is done by Hans. Design by Selva.
    Please see JIRA for an explanation.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sureshsubbiah/incubator-trafodion upsert1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/922.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #922
    
----
commit 1450e83627b5bdde6f947c963152ce00f9d5e907
Author: Suresh Subbiah <su...@apache.org>
Date:   2017-01-20T18:15:06Z

    [TRAFODION-2438] Unnecessary and sometimes wrong delete during upsert/merge with IM
    
    This change is done by Hans. Design by Selva.
    Please see JIRA for an explanation.

----


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

[GitHub] incubator-trafodion pull request #922: [TRAFODION-2438] Unnecessary and some...

Posted by zellerh <gi...@git.apache.org>.
Github user zellerh commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/922#discussion_r97387203
  
    --- Diff: core/sql/generator/GenRelUpdate.cpp ---
    @@ -1319,12 +1320,41 @@ short HbaseUpdate::codeGen(Generator * generator)
       const Int32 mergeInsertTuppIndex = 7;
       const Int32 mergeInsertRowIdTuppIndex = 8;
       const Int32 keyColValTuppIndex = 9;
    +  Int32 mergeIUDIndicatorTuppIndex = 0;
    +  // Do not use 10 as the next available tupp index. Please use 11 next
    +  // The 10th tuple index is used by merge statement below.
    +
    +  Attributes * iudIndicatorAttr = NULL;
     
       ULng32 asciiRowLen = 0; 
       ExpTupleDesc * asciiTupleDesc = 0;
     
       ex_cri_desc * work_cri_desc = NULL;
    -  work_cri_desc = new(space) ex_cri_desc(10, space);
    +  work_cri_desc = new(space) ex_cri_desc(11, space);
    +
    +  if (getProducedMergeIUDIndicator() != NULL_VALUE_ID) 
    +  {
    +    mergeIUDIndicatorTuppIndex = 10;
    +    iudIndicatorAttr = 
    +      (generator->addMapInfo(getProducedMergeIUDIndicator(), 0))->getAttr();
    +    iudIndicatorAttr->setAtpIndex(mergeIUDIndicatorTuppIndex);
    --- End diff --
    
    Just a comment, no need to change it: These three calls to set ATP, ATPIndex and Offset could be done with a call to ExpGenerator::processAttributes() or ExpGenerator::processValIdList(), but this works fine, too.


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

[GitHub] incubator-trafodion pull request #922: [TRAFODION-2438] Unnecessary and some...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-trafodion/pull/922


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