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/12/06 03:39:00 UTC

[1/2] incubator-trafodion git commit: [TRAFODION-2822] Make [first n] views non-updatable; prevent bad MERGE plans

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 318f48725 -> a07222ff3


[TRAFODION-2822] Make [first n] views non-updatable; prevent bad MERGE plans


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

Branch: refs/heads/master
Commit: 1ec20dd82299321dda02981964288fd0a93e092a
Parents: 6d2213d
Author: Dave Birdsall <db...@apache.org>
Authored: Wed Nov 29 17:43:49 2017 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Wed Nov 29 17:43:49 2017 +0000

----------------------------------------------------------------------
 core/sql/optimizer/NormRelExpr.cpp |  5 -----
 core/sql/optimizer/RelExpr.cpp     | 12 ++++++++++++
 2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1ec20dd8/core/sql/optimizer/NormRelExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/NormRelExpr.cpp b/core/sql/optimizer/NormRelExpr.cpp
index bf8d687..6a4dc4f 100644
--- a/core/sql/optimizer/NormRelExpr.cpp
+++ b/core/sql/optimizer/NormRelExpr.cpp
@@ -6995,11 +6995,6 @@ NABoolean RelRoot::isUpdatableBasic(NABoolean isView,
   // QSTUFF
 
     {
-      // if child is a FirstN node, skip it.
-      if ((child(0)->castToRelExpr()->getOperatorType() == REL_FIRST_N) &&
-	  (child(0)->child(0)))
-	scan = (Scan *)child(0)->child(0)->castToRelExpr();
-      else
 	scan = (Scan *)child(0)->castToRelExpr();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1ec20dd8/core/sql/optimizer/RelExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/RelExpr.cpp b/core/sql/optimizer/RelExpr.cpp
index 4f2f295..3ae230d 100644
--- a/core/sql/optimizer/RelExpr.cpp
+++ b/core/sql/optimizer/RelExpr.cpp
@@ -13535,6 +13535,12 @@ MergeUpdate::MergeUpdate(const CorrName &name,
   setCacheableNode(CmpMain::BIND);
   
   setIsMergeUpdate(TRUE);
+
+  // if there is a WHERE NOT MATCHED INSERT action, then the scan
+  // has to take place in the merge node at run time, so we have
+  // to suppress the TSJ transformation on this node
+  if (insertValues)
+    setNoFlow(TRUE);
 }
 
 MergeUpdate::~MergeUpdate() {}
@@ -13629,6 +13635,12 @@ MergeDelete::MergeDelete(const CorrName &name,
   setCacheableNode(CmpMain::BIND);
   
   setIsMergeDelete(TRUE);
+
+  // if there is a WHERE NOT MATCHED INSERT action, then the scan
+  // has to take place in the merge node at run time, so we have
+  // to suppress the TSJ transformation on this node
+  if (insertValues)
+    setNoFlow(TRUE);
 }
 
 MergeDelete::~MergeDelete() {}


[2/2] incubator-trafodion git commit: Merge [TRAFODION-2822] PR 1316 Make [first n] views not updatable + merge fix

Posted by db...@apache.org.
Merge [TRAFODION-2822] PR 1316 Make [first n] views not updatable + merge fix


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

Branch: refs/heads/master
Commit: a07222ff3e3e16d63e6a1fb1402712d809d5c31d
Parents: 318f487 1ec20dd
Author: Dave Birdsall <db...@apache.org>
Authored: Wed Dec 6 03:38:09 2017 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Wed Dec 6 03:38:09 2017 +0000

----------------------------------------------------------------------
 core/sql/optimizer/NormRelExpr.cpp |  5 -----
 core/sql/optimizer/RelExpr.cpp     | 12 ++++++++++++
 2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------