use of io.confluent.ksql.planner.plan.SuppressNode in project ksql by confluentinc.
the class LogicalPlannerTest method testSuppressLogicalPlan.
@Test
public void testSuppressLogicalPlan() {
final String simpleQuery = "SELECT col1,COUNT(*) as COUNT FROM test2 WINDOW TUMBLING (SIZE 2 MILLISECONDS, GRACE PERIOD 1 MILLISECONDS) GROUP BY col1 EMIT FINAL;";
final PlanNode logicalPlan = buildLogicalPlan(simpleQuery);
assertThat(logicalPlan.getSources().get(0), instanceOf(SuppressNode.class));
assertThat(logicalPlan.getSources().get(0).getSources().get(0), instanceOf(AggregateNode.class));
assertThat(logicalPlan.getSources().get(0).getSources().get(0).getSources().get(0), instanceOf(DataSourceNode.class));
assertThat(logicalPlan.getSchema().value().size(), equalTo(2));
Assert.assertNotNull(((SuppressNode) logicalPlan.getSources().get(0)).getRefinementInfo());
}
Aggregations