Search in sources :

Example 26 with ValuesNode

use of io.prestosql.spi.plan.ValuesNode in project hetu-core by openlookeng.

the class TestDistributedExecutionPlanner method testValuesSnapshot.

@Test
public void testValuesSnapshot() {
    ValuesNode a = values("A");
    ValuesNode b = values("B");
    assertNull(a.getResumeSnapshotId());
    assertEquals(a.getNextSnapshotId(), 0);
    SubPlan root = makePlan(1, join(a, b), ImmutableList.of());
    planner.plan(root, session, SNAPSHOT, null, 7);
    assertNull(a.getResumeSnapshotId());
    assertEquals(a.getNextSnapshotId(), 7);
    assertNull(b.getResumeSnapshotId());
    assertEquals(b.getNextSnapshotId(), 7);
}
Also used : ValuesNode(io.prestosql.spi.plan.ValuesNode) Test(org.testng.annotations.Test)

Aggregations

ValuesNode (io.prestosql.spi.plan.ValuesNode)26 Symbol (io.prestosql.spi.plan.Symbol)16 Test (org.testng.annotations.Test)12 PlanNode (io.prestosql.spi.plan.PlanNode)8 RowExpression (io.prestosql.spi.relation.RowExpression)8 List (java.util.List)8 ImmutableList (com.google.common.collect.ImmutableList)6 JoinNode (io.prestosql.spi.plan.JoinNode)6 ImmutableList.toImmutableList (com.google.common.collect.ImmutableList.toImmutableList)5 ProjectNode (io.prestosql.spi.plan.ProjectNode)5 MultiJoinNode (io.prestosql.sql.planner.iterative.rule.ReorderJoins.MultiJoinNode)5 MultiJoinNode.toMultiJoinNode (io.prestosql.sql.planner.iterative.rule.ReorderJoins.MultiJoinNode.toMultiJoinNode)5 PlanBuilder (io.prestosql.sql.planner.iterative.rule.test.PlanBuilder)5 ImmutableMap (com.google.common.collect.ImmutableMap)4 ConstantExpression (io.prestosql.spi.relation.ConstantExpression)4 ComparisonExpression (io.prestosql.sql.tree.ComparisonExpression)4 Session (io.prestosql.Session)3 OutputNode (io.prestosql.sql.planner.plan.OutputNode)3 OriginalExpressionUtils.castToRowExpression (io.prestosql.sql.relational.OriginalExpressionUtils.castToRowExpression)3 Expression (io.prestosql.sql.tree.Expression)3