trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbirds...@apache.org
Subject [1/2] incubator-trafodion git commit: [TRAFODION-1585] Allow MDAM on inner child of NJ if there is only one NJ probe
Date Mon, 06 Jun 2016 15:38:55 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 08e1faa21 -> f243f8017


[TRAFODION-1585] Allow MDAM on inner child of NJ if there is only one NJ probe


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

Branch: refs/heads/master
Commit: e2ffd9e096a841b8e57fc68776c981c3a98816e1
Parents: a2daeee
Author: Dave Birdsall <dbirdsall@apache.org>
Authored: Thu Jun 2 22:07:37 2016 +0000
Committer: Dave Birdsall <dbirdsall@apache.org>
Committed: Thu Jun 2 22:07:37 2016 +0000

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


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/e2ffd9e0/core/sql/optimizer/ScanOptimizer.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/ScanOptimizer.cpp b/core/sql/optimizer/ScanOptimizer.cpp
index 8a01739..d5dfdbc 100644
--- a/core/sql/optimizer/ScanOptimizer.cpp
+++ b/core/sql/optimizer/ScanOptimizer.cpp
@@ -3462,6 +3462,12 @@ ScanOptimizer::isMdamEnabled() const
       return TRUE;
     }
 
+    // If the input logical property indicates exactly one, then we
+    // allow MDAM in spite of NJ.
+    NABoolean isInputCardinalityOne = 
+      getContext().getInputLogProp()->isCardinalityEqOne();
+    if (isInputCardinalityOne)
+      return TRUE;
 
     /*
      Right side Scan of a Nested Join will use MDAM disjuncts if and only if


Mime
View raw message