use of org.voltdb.plannodes.TableCountPlanNode in project voltdb by VoltDB.
the class TestPlansCount method testCountStar000.
// DOES NOT support the cases down below right now
// This is treated as new TABLE COUNT plan for replicated table
public void testCountStar000() {
List<AbstractPlanNode> pn = compileToFragments("SELECT count(*) from T1");
AbstractPlanNode p = pn.get(0).getChild(0);
assertTrue(p instanceof TableCountPlanNode);
pn = compileToFragments("SELECT count(1) from T1");
p = pn.get(0).getChild(0);
assertTrue(p instanceof TableCountPlanNode);
}
use of org.voltdb.plannodes.TableCountPlanNode in project voltdb by VoltDB.
the class TestPlansCount method testCountStar004.
public void testCountStar004() {
List<AbstractPlanNode> pn = compileToFragments("select count(*) from (SELECT count(*) from P1) Temp");
AbstractPlanNode p = pn.get(0).getChild(0);
assertTrue(p instanceof TableCountPlanNode);
p = p.getChild(0);
assertTrue(p instanceof AggregatePlanNode);
p = pn.get(1).getChild(0);
assertTrue(p instanceof TableCountPlanNode);
pn = compileToFragments("select count(1) from (SELECT count(1) from P1) Temp");
p = pn.get(0).getChild(0);
assertTrue(p instanceof TableCountPlanNode);
p = p.getChild(0);
assertTrue(p instanceof AggregatePlanNode);
p = pn.get(1).getChild(0);
assertTrue(p instanceof TableCountPlanNode);
}
use of org.voltdb.plannodes.TableCountPlanNode in project voltdb by VoltDB.
the class TestPlansCount method testCountStar001.
// This is treated as new TABLE COUNT plan for partitioned table
public void testCountStar001() {
List<AbstractPlanNode> pn = compileToFragments("SELECT count(*) from P1");
AbstractPlanNode p = pn.get(0).getChild(0);
// AGGREGATE_SUM
assertTrue(p instanceof AggregatePlanNode);
p = pn.get(1).getChild(0);
assertTrue(p instanceof TableCountPlanNode);
pn = compileToFragments("SELECT count(1) from P1");
p = pn.get(0).getChild(0);
// AGGREGATE_SUM
assertTrue(p instanceof AggregatePlanNode);
p = pn.get(1).getChild(0);
assertTrue(p instanceof TableCountPlanNode);
}
Aggregations