Example #1
0
 /// <summary>
 /// Creates a transitively generated join edge
 /// </summary>
 /// <param name="left">the left table</param>
 /// <param name="right">the right table</param>
 /// <param name="joinKind">the join kind</param>
 /// <param name="leftVars">left equijoin vars</param>
 /// <param name="rightVars">right equijoin vars</param>
 /// <returns>the join edge</returns>
 internal static JoinEdge CreateTransitiveJoinEdge(
     AugmentedTableNode left, AugmentedTableNode right, JoinKind joinKind,
     List<ColumnVar> leftVars, List<ColumnVar> rightVars)
 {
     var joinEdge = new JoinEdge(left, right, null, joinKind, leftVars, rightVars);
     return joinEdge;
 }
Example #2
0
        internal static JoinEdge CreateJoinEdge(
            AugmentedTableNode left, AugmentedTableNode right,
            AugmentedJoinNode joinNode,
            ColumnVar leftVar, ColumnVar rightVar)
        {
            var leftVars = new List<ColumnVar>();
            var rightVars = new List<ColumnVar>();
            leftVars.Add(leftVar);
            rightVars.Add(rightVar);

            var joinOpType = joinNode.Node.Op.OpType;
            PlanCompiler.Assert(
                (joinOpType == OpType.LeftOuterJoin || joinOpType == OpType.InnerJoin),
                "Unexpected join type for join edge: " + joinOpType);

            var joinKind = joinOpType == OpType.LeftOuterJoin ? JoinKind.LeftOuter : JoinKind.Inner;

            var joinEdge = new JoinEdge(left, right, joinNode, joinKind, leftVars, rightVars);
            return joinEdge;
        }