use of io.confluent.ksql.parser.tree.QueryContainer in project ksql by confluentinc.
the class AstBuilderTest method shouldSupportExplicitEmitChangesForCsas.
@Test
public void shouldSupportExplicitEmitChangesForCsas() {
// Given:
final SingleStatementContext stmt = givenQuery("CREATE STREAM X AS SELECT * FROM TEST1 EMIT CHANGES;");
// When:
final Query result = ((QueryContainer) builder.buildStatement(stmt)).getQuery();
// Then:
assertThat("Should be push", result.isPullQuery(), is(false));
assertThat(result.getRefinement().get().getOutputRefinement(), is(OutputRefinement.CHANGES));
}
Aggregations