Exemplo n.º 1
0
 protected override void VisitRelOpDefault(RelOp op, Node n)
 {
     VisitDefault(n);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Default RelOp processing: 
 /// 
 /// We really don't want to allow any NestOps through; just fail if we don't have
 /// something coded.
 /// </summary>
 /// <param name="op"></param>
 /// <param name="n"></param>
 /// <returns></returns>
 protected override Node VisitRelOpDefault(RelOp op, Node n)
 {
     return NestingNotSupported(op, n);
 }
 protected override Node VisitRelOpDefault(RelOp op, Node n)
 {
     return null;
 }
Exemplo n.º 4
0
 protected override void VisitRelOpDefault(RelOp op, Node n)
 {
     VisitDefault(n);
 }
        /// <summary>
        /// Default processing for RelOps. 
        /// - First, we mark the current node as its own ancestor (so that any 
        ///   subqueries that we detect internally will be added to this node's list)
        /// - then, visit each child
        /// - finally, accumulate all nested subqueries.
        /// - if the current RelOp has only one input, then add the nested subqueries via
        ///   Outer apply nodes to this input. 
        /// 
        /// The interesting RelOps are 
        ///   Project, Filter, GroupBy, Sort,  
        /// Should we break this out into separate functions instead?
        /// </summary>
        /// <param name="op">Current RelOp</param>
        /// <param name="n">Node to process</param>
        /// <returns>Current subtree</returns> 
        protected override Node VisitRelOpDefault(RelOp op, Node n)
        {
            VisitChildren(n); // visit all my children first

            // Then identify all the subqueries that have shown up as part of my node
            // Create Apply Nodes for each of these.
            List<Node> nestedSubqueries;
            if (m_nodeSubqueries.TryGetValue(n, out nestedSubqueries) && nestedSubqueries.Count > 0)
            {
                // Validate - this must only apply to the following nodes
                PlanCompiler.Assert(
                    n.Op.OpType == OpType.Project || n.Op.OpType == OpType.Filter ||
                    n.Op.OpType == OpType.GroupBy || n.Op.OpType == OpType.GroupByInto,
                    "VisitRelOpDefault: Unexpected op?" + n.Op.OpType);

                Node newInputNode = AugmentWithSubqueries(n.Child0, nestedSubqueries, true);
                // Now make this the new input child
                n.Child0 = newInputNode;
            }

            return n;
        }
Exemplo n.º 6
0
 /// <summary>
 /// Default visitor for RelOps. Simply visits the children, and 
 /// then tries to recompute the NodeInfo (with the fond hope that
 /// some keys have now shown up)
 /// </summary>
 /// <param name="op"></param>
 /// <param name="n"></param>
 protected override void VisitRelOpDefault(RelOp op, Node n)
 {
     VisitChildren(n);
     m_command.RecomputeNodeInfo(n);
 }
Exemplo n.º 7
0
 protected virtual void VisitRelOpDefault(RelOp op, Node n)
 {
     VisitDefault(n);
 }