internal override CellTreeNode VisitOpNode(OpCellTreeNode node, bool dummy) { List <CellTreeNode> flattenedChildren = new List <CellTreeNode>(); // Flatten the children first foreach (CellTreeNode child in node.Children) { CellTreeNode flattenedChild = child.Accept <bool, CellTreeNode>(this, dummy); flattenedChildren.Add(flattenedChild); } Debug.Assert(flattenedChildren.Count > 1, "node must have more than 1 child and be an OpCellTreeNode"); // If this op is associative and a child's OP is the same as this // op, add those to be this nodes children List <CellTreeNode> finalChildren = flattenedChildren; if (CellTreeNode.IsAssociativeOp(node.OpType)) { finalChildren = new List <CellTreeNode>(); foreach (CellTreeNode child in flattenedChildren) { if (child.OpType == node.OpType) { finalChildren.AddRange(child.Children); } else { finalChildren.Add(child); } } } OpCellTreeNode result = new OpCellTreeNode(node.ViewgenContext, node.OpType, finalChildren); return(result); }
internal override CellTreeNode VisitLeftAntiSemiJoin(OpCellTreeNode node, TInput param) { return(AcceptChildren(node, param)); }
internal override CellTreeNode VisitFullOuterJoin(OpCellTreeNode node, TInput param) { return(AcceptChildren(node, param)); }
internal abstract TOutput VisitOpNode(OpCellTreeNode node, TInput param);
internal abstract TOutput VisitLeftAntiSemiJoin(OpCellTreeNode node, TInput param);
internal abstract TOutput VisitFullOuterJoin(OpCellTreeNode node, TInput param);