You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2017/10/05 15:25:13 UTC
[4/5] incubator-trafodion git commit: Rework some comments
Rework some comments
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/4e9d5f3f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/4e9d5f3f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/4e9d5f3f
Branch: refs/heads/master
Commit: 4e9d5f3f0b47e9dfc87551644cf16729d7f849a2
Parents: 1877b7d
Author: Dave Birdsall <db...@apache.org>
Authored: Wed Oct 4 22:30:01 2017 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Wed Oct 4 22:30:01 2017 +0000
----------------------------------------------------------------------
core/sql/generator/GenRelUpdate.cpp | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4e9d5f3f/core/sql/generator/GenRelUpdate.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenRelUpdate.cpp b/core/sql/generator/GenRelUpdate.cpp
index 9cda158..2c93d69 100644
--- a/core/sql/generator/GenRelUpdate.cpp
+++ b/core/sql/generator/GenRelUpdate.cpp
@@ -1808,13 +1808,11 @@ short HbaseUpdate::codeGen(Generator * generator)
{
// Generate the update and insert constraint check expressions
- // The attributes for the columns referenced in the constraint expressions
- // refer to the source values of the columns. We want to evaluate the
- // constraints aganst the target values, though. So, there is some
- // Attributes gymnastics that has to happen to generate them.
-
- // Obtain the ValueIds of base table columns referenced in the
- // constraints
+ // The constraint expressions at this time refer to the source values
+ // of the columns. We want to evaluate the constraints aganst the target
+ // values, though. So, we collect the source column ValueIds here so
+ // we can map them to the appropriate target, which is dependent on
+ // which constraint expression we are generating.
ValueId constraintId;
ValueIdSet constraintColumns;
@@ -1835,8 +1833,7 @@ short HbaseUpdate::codeGen(Generator * generator)
if (getTableDesc()->getNATable()->hasSerializedEncodedColumn())
constrTree = generator->addCompDecodeForDerialization(constrTree, isAlignedFormat);
- // Generate the update constraint expression, substituting Attributes for
- // the new update record
+ // Generate the update constraint expression
genUpdConstraintExpr(generator,
constrTree,
@@ -1846,8 +1843,7 @@ short HbaseUpdate::codeGen(Generator * generator)
if ((isMerge()) && (mergeInsertRecExprArray().entries() > 0))
{
- // Generate the insert constraint expression, substituting Attributes for
- // the new insert record
+ // Generate the insert constraint expression
genUpdConstraintExpr(generator,
constrTree,