use of io.confluent.ksql.execution.plan.TableGroupBy in project ksql by confluentinc.
the class StepSchemaResolverTest method shouldResolveSchemaForTableGroupByAnyKey.
@Test
public void shouldResolveSchemaForTableGroupByAnyKey() {
// Given:
final TableGroupBy<?> step = new TableGroupBy<>(PROPERTIES, tableSource, formats, ImmutableList.of(new UnqualifiedColumnReferenceExp(Optional.empty(), ORANGE_COL)));
// When:
final LogicalSchema result = resolver.resolve(step, SCHEMA);
// Then:
assertThat(result, is(LogicalSchema.builder().keyColumn(ORANGE_COL, SqlTypes.INTEGER).valueColumns(SCHEMA.value()).build()));
}
use of io.confluent.ksql.execution.plan.TableGroupBy in project ksql by confluentinc.
the class StepSchemaResolverTest method shouldResolveSchemaForTableGroupBy.
@Test
public void shouldResolveSchemaForTableGroupBy() {
// Given:
final TableGroupBy<?> step = new TableGroupBy<>(PROPERTIES, tableSource, formats, ImmutableList.of(new UnqualifiedColumnReferenceExp(Optional.empty(), ORANGE_COL)));
// When:
final LogicalSchema result = resolver.resolve(step, SCHEMA);
// Then:
assertThat(result, is(LogicalSchema.builder().keyColumn(ORANGE_COL, SqlTypes.INTEGER).valueColumns(SCHEMA.value()).build()));
}
Aggregations