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 [email protected] or file a JIRA ticket
with INFRA.
---