Change comments per Hans' suggtestion

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

Branch: refs/heads/master
Commit: a4d552244fc36f81530f4e083fd64cd6634f5e4d
Parents: 64d1e33
Author: Dave Birdsall <[email protected]>
Authored: Mon Apr 23 22:09:56 2018 +0000
Committer: Dave Birdsall <[email protected]>
Committed: Mon Apr 23 22:09:56 2018 +0000

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


http://git-wip-us.apache.org/repos/asf/trafodion/blob/a4d55224/core/sql/optimizer/NormRelExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/NormRelExpr.cpp 
b/core/sql/optimizer/NormRelExpr.cpp
index 115b406..6d1ef4c 100644
--- a/core/sql/optimizer/NormRelExpr.cpp
+++ b/core/sql/optimizer/NormRelExpr.cpp
@@ -2778,6 +2778,8 @@ as the join's right child. This transformation is enabled 
by default
 only if the right side is an IN list or if the groupby's reduction 
 ratio is greater than 5.0, otherwise a CQD has to be used.
 
+Examples:
+
 select t1.a
 from t1
 where t1.b in (1,2,3,4,...,101) ;
@@ -2791,6 +2793,19 @@ Scan t1   TupleList                 Scan t1   GroupBy 
{group cols: InList.col}
                                                   |
                                                 TupleList
 
+select t1.a
+from t1
+where t1.b in (select t2.c from t2 where whatever) ;
+
+
+  Semi Join {pred : t1.b = t2.c }       Join {pred : t1.b = t2.c}
+ /         \                   ------->  /    \
+/           \                           /      \
+Scan t1   Scan t2                   Scan t1   GroupBy {group cols: t2.c}
+                                                  |
+                                                  |
+                                                Scan t2
+
 */
 
 RelExpr* Join::transformSemiJoin(NormWA& normWARef) 

Reply via email to