Package org.voltdb.plannodes

Examples of org.voltdb.plannodes.AbstractPlanNode


            assertFalse(pn.findAllNodesOfType(PlanNodeType.ORDERBY).isEmpty());
        }
    }

    public void testOrderByThree() {
        AbstractPlanNode pn = null;
        pn = compile("SELECT * from T ORDER BY T_PKEY, T_D1, T_D2", 0);
        if (pn != null) {
            assertTrue(pn.findAllNodesOfType(PlanNodeType.INDEXSCAN).isEmpty());
            assertFalse(pn.findAllNodesOfType(PlanNodeType.SEQSCAN).isEmpty());
            assertFalse(pn.findAllNodesOfType(PlanNodeType.ORDERBY).isEmpty());
        }
    }
View Full Code Here


            assertFalse(pn.findAllNodesOfType(PlanNodeType.ORDERBY).isEmpty());
        }
    }

    public void testNoOrderBy() {
        AbstractPlanNode pn = null;
        pn = compile("SELECT * FROM T ORDER BY T_D2", 0);
        if (pn != null) {
            assertTrue(pn.findAllNodesOfType(PlanNodeType.INDEXSCAN).isEmpty());
            assertFalse(pn.findAllNodesOfType(PlanNodeType.SEQSCAN).isEmpty());
            assertFalse(pn.findAllNodesOfType(PlanNodeType.ORDERBY).isEmpty());
        }
    }
View Full Code Here

public class TestPlansGroupBy extends TestCase {

    private PlannerTestAideDeCamp aide;

    private AbstractPlanNode compile(String sql, int paramCount) {
        AbstractPlanNode pn = null;
        try {
            pn =  aide.compile(sql, paramCount);
        }
        catch (NullPointerException ex) {
            // aide may throw NPE if no plangraph was created
View Full Code Here

        aide.tearDown();
    }


    public void testGroupByA1() {
        AbstractPlanNode pn = null;
        pn = compile("SELECT A1 from T1 group by A1", 0);
        if (pn != null)
            System.out.println(pn.toJSONString());
    }
View Full Code Here

        if (pn != null)
            System.out.println(pn.toJSONString());
    }

    public void testCountA1GroupByA1() {
        AbstractPlanNode pn = null;
        pn = compile("SELECT count(A1) from T1 group by A1", 0);
        if (pn != null) {
            System.out.println(pn.toJSONString());
        }
   }
View Full Code Here

            System.out.println(pn.toJSONString());
        }
   }

    public void testCountA1() {
        AbstractPlanNode pn = null;
        pn = compile("SELECT count(A1) from T1", 0);
        if (pn != null)
            System.out.println(pn.toJSONString());
    }
View Full Code Here

            System.out.println(pn.toJSONString());
    }

    public void testCountStar()
    {
        AbstractPlanNode pn = null;
        pn = compile("SELECT count(*) from T1", 0);
        if (pn != null)
        {
            System.out.println(pn.toJSONString());
        }
    }
View Full Code Here

            System.out.println(pn.toJSONString());
        }
    }

   public void testCountDistinctA1() {
       AbstractPlanNode pn = null;
       pn = compile("SELECT count(distinct A1) from T1", 0);
       if (pn != null)
           System.out.println(pn.toJSONString());
   }
View Full Code Here

       if (pn != null)
           System.out.println(pn.toJSONString());
   }

    public void testDistinctA1() {
        AbstractPlanNode pn = null;
        pn = compile("SELECT DISTINCT A1 FROM T1", 0);
        if (pn != null)
                System.out.println(pn.toJSONString());
    }
View Full Code Here

        Collection<Column> ret = CACHE_OUTPUT_COLUMNS.get(catalog_stmt);
        if (ret == null && catalog_stmt.getQuerytype() == QueryType.SELECT.getValue()) {
            // It's easier to figure things out if we use the single-partition
            // query plan
            final Database catalog_db = CatalogUtil.getDatabase(catalog_stmt);
            final AbstractPlanNode root = PlanNodeUtil.getRootPlanNodeForStatement(catalog_stmt, true);
            assert (root != null);
            assert (root instanceof SendPlanNode) : "Unexpected PlanNode root " + root + " for " + catalog_stmt.fullName();

            // We need to examine down the tree to figure out what this thing
            // shoving out to the outside world
            assert (root.getChildPlanNodeCount() == 1) : "Unexpected one child for " + root + " for " + catalog_stmt.fullName() + " but it has " + root.getChildPlanNodeCount();
            ret = Collections.unmodifiableCollection(PlanNodeUtil.getOutputColumnsForPlanNode(catalog_db, root.getChild(0)));
            CACHE_OUTPUT_COLUMNS.put(catalog_stmt, ret);
        }
        return (ret);
    }
View Full Code Here

TOP

Related Classes of org.voltdb.plannodes.AbstractPlanNode

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.