Package edu.brown.plannodes

Examples of edu.brown.plannodes.PlanNodeTreeWalker


    }

    @Override
    public Pair<Boolean, AbstractPlanNode> optimize(final AbstractPlanNode root) {
        modified.set(false);
        new PlanNodeTreeWalker(false) {
            @Override
            protected void callback(AbstractPlanNode element) {
                // ---------------------------------------------------
                // ADD INLINE PROJECTION TO LEAF SCANS
                // ---------------------------------------------------
View Full Code Here


    @Override
    public Pair<Boolean, AbstractPlanNode> optimize(final AbstractPlanNode rootNode) {
        this.new_root = rootNode;
        this.modified.set(false);

        new PlanNodeTreeWalker(false) {
            protected void callback(AbstractPlanNode element) {

                // CASE #1
                // If we are a ScanNode that has an inline projection with the
                // same number of output columns as the scanned table in the
View Full Code Here

        return (Pair.of(modified.get(), this.new_root));
    }

    private ProjectionPlanNode getFirstProjection(final AbstractPlanNode root) {
        final ProjectionPlanNode proj_node[] = { null };
        new PlanNodeTreeWalker(true) {
            @Override
            protected void callback(AbstractPlanNode element) {
                if (element != root && element instanceof ProjectionPlanNode) {
                    proj_node[0] = (ProjectionPlanNode) element;
                    this.stop();
View Full Code Here

            this.visualizationPanel.zoom(1.2);
            this.zoomed = true;
        }
       
        final int depth = PlanNodeUtil.getDepth(this.root) / 2;
        new PlanNodeTreeWalker(false) {
            @Override
            protected void callback(AbstractPlanNode element) {
                if (depth == this.getDepth()) {
                    PlanTreeCatalogNode.this.visualizationPanel.centerVisualization(element, true);
                    this.stop();
View Full Code Here

        // maintain data structure - (most recent "immediate" table)
        final Map<String, Integer> intermediate_offset_tbl = new HashMap<String, Integer>();
        // maintain column name to GUID
        final Map<String, Integer> intermediate_GUID_tbl = new HashMap<String, Integer>();

        new PlanNodeTreeWalker() {
            @Override
            protected void callback(AbstractPlanNode element) {
                // skip the column offset checking for the root send - the EE
                // doesn't care
                if (this.getDepth() != 0) {
View Full Code Here

        expected.add(SendPlanNode.class);
        expected.add(SeqScanPlanNode.class);
        final List<Class<? extends AbstractPlanNode>> found = new ArrayList<Class<? extends AbstractPlanNode>>();
       
        // System.out.println(PlanNodeUtil.debug(root_node));
        new PlanNodeTreeWalker() {
            @Override
            protected void callback(AbstractPlanNode element) {
                // Nothing...
            }
            @Override
View Full Code Here

        List<Class<? extends AbstractPlanNode>> expected = new ArrayList<Class<? extends AbstractPlanNode>>();
        expected.add(SendPlanNode.class);
        expected.add(SeqScanPlanNode.class);
        final List<Class<? extends AbstractPlanNode>> found = new ArrayList<Class<? extends AbstractPlanNode>>();
       
        new PlanNodeTreeWalker() {
            @Override
            protected void callback(AbstractPlanNode element) {
                // Nothing...
            }
            @Override
View Full Code Here

            List<Class<? extends AbstractPlanNode>> expected = new ArrayList<Class<? extends AbstractPlanNode>>();
            expected.add(SendPlanNode.class);
            expected.add(SeqScanPlanNode.class);
            final List<Class<? extends AbstractPlanNode>> found = new ArrayList<Class<? extends AbstractPlanNode>>();
           
            new PlanNodeTreeWalker() {
                @Override
                protected void callback(AbstractPlanNode element) {
                    // Nothing...
                }
                @Override
View Full Code Here

           
            assertTrue(col0.equals(col1, false, true));
        } // FOR
       

        new PlanNodeTreeWalker() {

            @Override
            protected void callback(AbstractPlanNode element) {
                // System.out.println("element plannodetype: " +
                // element.getPlanNodeType() + " depth: " + this.getDepth());
View Full Code Here

        // check two hashmaps contain what we expect
        checkPlanNodeColumns(state.planNodeColumns);
        checkTableColumns(state.tableColumns);
        System.out.println("Root Node: " + rootNode + " output columns: " + rootNode.getOutputColumnGUIDs() + " child type: " + rootNode.getChild(0).getPlanNodeType());
        // walk the tree and call extractColumnInfo on a rootNode
        new PlanNodeTreeWalker(true) {
            @Override
            protected void callback(AbstractPlanNode element) {
                // if (trace) LOG.trace(PlanNodeUtil.debugNode(element));
                // call function to build the data structure that maps all nodes
                // to the columns they affect
View Full Code Here

TOP

Related Classes of edu.brown.plannodes.PlanNodeTreeWalker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.