use of io.prestosql.spi.plan.PlanNode in project hetu-core by openlookeng.
the class TestExternalFunctionPushDownChecker method testSpatialJoinNode.
@Test
public void testSpatialJoinNode() {
PlanNode node = new SpatialJoinNode(idAllocator.getNextId(), SpatialJoinNode.Type.INNER, builder.values(columnA), builder.values(columnB), ImmutableList.of(columnB, columnA), sumCall, Optional.empty(), Optional.empty(), Optional.empty());
validatePlan(node);
}
use of io.prestosql.spi.plan.PlanNode in project hetu-core by openlookeng.
the class TestExternalFunctionPushDownChecker method testTableWriterNodeWithExternalCall.
@Test(expectedExceptions = ExternalFunctionPushDownChecker.IllegalExternalFunctionUsageException.class, expectedExceptionsMessageRegExp = "The external function jdbc.v1.foo does not support to push down to data source for this query.")
public void testTableWriterNodeWithExternalCall() {
TableWriterNode.DeleteTarget deleteTarget = new TableWriterNode.DeleteTarget(tableHandle, new SchemaTableName("sch", "tab"));
PlanNode node = new TableWriterNode(idAllocator.getNextId(), builder.values(), deleteTarget, columnA, columnB, ImmutableList.of(columnA, columnB), ImmutableList.of("a", "b"), Optional.empty(), Optional.of(new StatisticAggregations(ImmutableMap.of(columnA, new AggregationNode.Aggregation(externalFooCall1, externalFooCall1.getArguments(), false, Optional.empty(), Optional.empty(), Optional.empty())), ImmutableList.of(columnA))), Optional.of(new StatisticAggregationsDescriptor<>(ImmutableMap.of(), ImmutableMap.of(), ImmutableMap.of())));
validatePlan(node);
}
use of io.prestosql.spi.plan.PlanNode in project hetu-core by openlookeng.
the class TestExternalFunctionPushDownChecker method testTableWriterNode.
@Test
public void testTableWriterNode() {
TableWriterNode.DeleteTarget deleteTarget = new TableWriterNode.DeleteTarget(tableHandle, new SchemaTableName("sch", "tab"));
PlanNode node = new TableWriterNode(idAllocator.getNextId(), builder.values(), deleteTarget, columnA, columnB, ImmutableList.of(columnA, columnB), ImmutableList.of("a", "b"), Optional.empty(), Optional.of(new StatisticAggregations(ImmutableMap.of(columnA, new AggregationNode.Aggregation(sumCall, sumCall.getArguments(), false, Optional.empty(), Optional.empty(), Optional.empty())), ImmutableList.of(columnA))), Optional.of(new StatisticAggregationsDescriptor<>(ImmutableMap.of(), ImmutableMap.of(), ImmutableMap.of())));
validatePlan(node);
}
use of io.prestosql.spi.plan.PlanNode in project hetu-core by openlookeng.
the class TestExternalFunctionPushDownChecker method testVacuumTableNode.
@Test
public void testVacuumTableNode() {
TableWriterNode.DeleteTarget deleteTarget = new TableWriterNode.DeleteTarget(tableHandle, new SchemaTableName("sch", "tab"));
PlanNode node = new VacuumTableNode(idAllocator.getNextId(), tableHandle, deleteTarget, columnA, columnB, "p1", false, ImmutableList.of(), Optional.of(new StatisticAggregations(ImmutableMap.of(columnA, new AggregationNode.Aggregation(sumCall, sumCall.getArguments(), false, Optional.empty(), Optional.empty(), Optional.empty())), ImmutableList.of(columnA))), Optional.of(new StatisticAggregationsDescriptor<>(ImmutableMap.of(), ImmutableMap.of(), ImmutableMap.of())));
validatePlan(node);
}
use of io.prestosql.spi.plan.PlanNode in project hetu-core by openlookeng.
the class TestExternalFunctionPushDownChecker method testFilterNodeWithExternalCallMultiple.
@Test(expectedExceptions = ExternalFunctionPushDownChecker.IllegalExternalFunctionUsageException.class, expectedExceptionsMessageRegExp = "The external function jdbc.v1.foo, jdbc.v1.foo2 does not support to push down to data source for this query.")
public void testFilterNodeWithExternalCallMultiple() {
PlanNode root = builder.filter(externalFooCall1, builder.filter(externalFooCall2, builder.values(columnA)));
validatePlan(root);
}
Aggregations