// List of columns of this table that are nullable (and must have nulls pruned out)

        #endregion

        #region constructors

        /// <summary>
        /// Basic constructor
        /// </summary>
        /// <param name="id">node id</param>
        /// <param name="node">scan table node</param>
        internal AugmentedTableNode(int id, Node node)
            : base(id, node)
        {
            var scanTableOp = (ScanTableOp)node.Op;
            m_table = scanTableOp.Table;
            LastVisibleId = id;
            m_replacementTable = this;
            m_newLocationId = id;
        }
Пример #2
0
 private JoinEdge(
     AugmentedTableNode left, AugmentedTableNode right,
     AugmentedJoinNode joinNode, JoinKind joinKind,
     List<ColumnVar> leftVars, List<ColumnVar> rightVars)
 {
     m_left = left;
     m_right = right;
     JoinKind = joinKind;
     m_joinNode = joinNode;
     m_leftVars = leftVars;
     m_rightVars = rightVars;
     PlanCompiler.Assert(m_leftVars.Count == m_rightVars.Count, "Count mismatch: " + m_leftVars.Count + "," + m_rightVars.Count);
 }
Пример #3
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;
 }
Пример #4
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;
        }