Ejemplo n.º 1
0
        public override void Visit(UnnestOp op, Node n)
        {
            Dictionary <string, object> attrs = new Dictionary <string, object>();

            if (null != op.Var)
            {
                attrs.Add("Var", op.Var.Id);
            }
            using (new AutoXml(this, op, attrs)) {
                DumpTable(op.Table);
                VisitChildren(n);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Clone an UnnestOp
        /// </summary>
        /// <param name="op">The Op to Copy</param>
        /// <param name="n">The Node that references the Op</param>
        /// <returns>A copy of the original Node that references a copy of the original Op</returns>
        public override Node Visit(UnnestOp op, Node n)
        {
            // Visit the Node's children and map their Vars
            List <Node> children = ProcessChildren(n);

            // Get the mapped unnest-var
            Var mappedVar = GetMappedVar(op.Var);

            // Create a new unnestOp
            Table    newTable  = m_destCmd.CreateTableInstance(op.Table.TableMetadata);
            UnnestOp newUnnest = m_destCmd.CreateUnnestOp(mappedVar, newTable);

            // Map the corresponding tables/columns
            MapTable(newUnnest.Table, op.Table);

            // create the unnest node
            return(m_destCmd.CreateNode(newUnnest, children));
        }
Ejemplo n.º 3
0
 public override void Visit(UnnestOp op, Node n)
 {
     VisitRelOpDefault(op, n);
     AssertOpType(n.Child0.Op, OpType.VarDef);
 }