You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by su...@apache.org on 2017/02/02 17:34:49 UTC

[1/2] incubator-trafodion git commit: [TRAFODION-2464] failure to upsert into a table with an index

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 51f8743da -> 0de966049


[TRAFODION-2464] failure to upsert into a table with an index

During upsert into table with index there is a temporary scan in optimizer.
If index access path is chosen for this scan, query would raise an error.
This is now fixed by using the correct indexDesc from this temporary scan.


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

Branch: refs/heads/master
Commit: db845285e3386ba5fc59c7a7726be3864b56f2ee
Parents: 478478c
Author: Suresh Subbiah <su...@apache.org>
Authored: Fri Jan 27 20:37:14 2017 +0000
Committer: Suresh Subbiah <su...@apache.org>
Committed: Fri Jan 27 20:37:14 2017 +0000

----------------------------------------------------------------------
 core/sql/optimizer/ImplRule.cpp | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/db845285/core/sql/optimizer/ImplRule.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/ImplRule.cpp b/core/sql/optimizer/ImplRule.cpp
index d446c7d..12ce5c7 100644
--- a/core/sql/optimizer/ImplRule.cpp
+++ b/core/sql/optimizer/ImplRule.cpp
@@ -2381,12 +2381,9 @@ RelExpr * HbaseUpdateRule::nextSubstitute(RelExpr * before,
   // SimpleFileScanOptimizer::constructSearchKey()
   /////////////////////////////////////////////////////////////////////////
   ValueIdSet exePreds(scan->getSelectionPred());
-
-  // only get the first member from the index set
-  if ( scan->deriveIndexOnlyIndexDesc().entries() == 0 )
-    return NULL;
-
-  IndexDesc* idesc = (scan->deriveIndexOnlyIndexDesc())[0];
+  // Use indexdesc of base table, een if the optimizer has chosen an
+  // index access path for this soon to be gone scan.
+  const IndexDesc* idesc = scan->getTableDesc()->getClusteringIndex();
   ValueIdSet clusteringKeyCols(
        idesc->getClusteringKeyCols());
   ValueIdSet generatedComputedColPreds;


[2/2] incubator-trafodion git commit: Merge [TRAFODION-2464] PR-935 failure to upsert into a table with an index

Posted by su...@apache.org.
Merge [TRAFODION-2464] PR-935 failure to upsert into a table with an index


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

Branch: refs/heads/master
Commit: 0de9660496db8079839604f67da369af933fdea8
Parents: 51f8743 db84528
Author: Suresh Subbiah <su...@apache.org>
Authored: Thu Feb 2 17:34:09 2017 +0000
Committer: Suresh Subbiah <su...@apache.org>
Committed: Thu Feb 2 17:34:09 2017 +0000

----------------------------------------------------------------------
 core/sql/optimizer/ImplRule.cpp | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------