Repository: incubator-trafodion
Updated Branches:
  refs/heads/master aea761532 -> cdd1bef06


TRAFODION-1983 Generator error 7000 with a salted table


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/a2786b57
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/a2786b57
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/a2786b57

Branch: refs/heads/master
Commit: a2786b57d71e7876b204c0925047cf736b1ee44d
Parents: 1407692
Author: Hans Zeller <[email protected]>
Authored: Tue May 10 01:47:19 2016 +0000
Committer: Hans Zeller <[email protected]>
Committed: Tue May 10 01:47:19 2016 +0000

----------------------------------------------------------------------
 core/sql/optimizer/ValueDesc.cpp | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a2786b57/core/sql/optimizer/ValueDesc.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/ValueDesc.cpp b/core/sql/optimizer/ValueDesc.cpp
index 95246aa..59edfeb 100644
--- a/core/sql/optimizer/ValueDesc.cpp
+++ b/core/sql/optimizer/ValueDesc.cpp
@@ -6530,6 +6530,11 @@ ValueIdList::computeEncodedKey(const TableDesc* tDesc, 
NABoolean isMaxKey,
           
           ConstValue* value = NULL;
           if ( ie->doesExprEvaluateToConstant(TRUE, TRUE) ) {
+             ValueIdSet availableValues;
+             // do a simple VEG replacement with no available values
+             // and no inputs, all VEGies should have constants in
+             // them and should be replaced with those
+             ie = ie->replaceVEGExpressions(availableValues, availableValues);
              value = ie->evaluate(STMTHEAP);
              if ( !value )
                 return NULL;

Reply via email to