Ejemplo n.º 1
0
        LogicNode outerJoinSimplication(LogicNode root)
        {
            Expr extraFilter = null;

            if (root is LogicFilter rf)
            {
                extraFilter = rf.filter_;
            }

            LogicNode ret = root;

            root.VisitEach((parent, index, node) => {
                if (node is LogicJoin)
                {
                    if (parent != null)
                    {
                        parent.children_[index] = trySimplifyOuterJoin(node as LogicJoin, extraFilter);
                    }
                    else
                    {
                        ret = trySimplifyOuterJoin(node as LogicJoin, extraFilter);
                    }
                }
            });

            return(ret);
        }