Search in sources :

Example 1 with KGroupedStreamHolder

use of io.confluent.ksql.execution.plan.KGroupedStreamHolder in project ksql by confluentinc.

the class StreamGroupByBuilderV1Test method shouldReturnCorrectSchemaForGroupByKey.

@Test
public void shouldReturnCorrectSchemaForGroupByKey() {
    // When:
    final KGroupedStreamHolder result = builder.build(streamHolder, groupByKey);
    // Then:
    assertThat(result.getSchema(), is(SCHEMA));
}
Also used : KGroupedStreamHolder(io.confluent.ksql.execution.plan.KGroupedStreamHolder) Test(org.junit.Test)

Example 2 with KGroupedStreamHolder

use of io.confluent.ksql.execution.plan.KGroupedStreamHolder in project ksql by confluentinc.

the class StreamGroupByBuilderTest method shouldPerformGroupByCorrectly.

@Test
public void shouldPerformGroupByCorrectly() {
    // When:
    final KGroupedStreamHolder result = buildGroupBy(builder, streamHolder, groupBy);
    // Then:
    assertThat(result.getGroupedStream(), is(groupedStream));
    verify(sourceStream).filter(any());
    verify(filteredStream).groupBy(any(), same(grouped));
    verifyNoMoreInteractions(filteredStream, sourceStream);
}
Also used : KGroupedStreamHolder(io.confluent.ksql.execution.plan.KGroupedStreamHolder) Test(org.junit.Test)

Example 3 with KGroupedStreamHolder

use of io.confluent.ksql.execution.plan.KGroupedStreamHolder in project ksql by confluentinc.

the class StreamGroupByBuilderTest method shouldReturnCorrectSchemaForGroupBy.

@Test
public void shouldReturnCorrectSchemaForGroupBy() {
    // When:
    final KGroupedStreamHolder result = buildGroupBy(builder, streamHolder, groupBy);
    // Then:
    assertThat(result.getSchema(), is(REKEYED_SCHEMA));
}
Also used : KGroupedStreamHolder(io.confluent.ksql.execution.plan.KGroupedStreamHolder) Test(org.junit.Test)

Example 4 with KGroupedStreamHolder

use of io.confluent.ksql.execution.plan.KGroupedStreamHolder in project ksql by confluentinc.

the class StreamGroupByBuilderTest method shouldReturnCorrectSchemaForGroupByKey.

@Test
public void shouldReturnCorrectSchemaForGroupByKey() {
    // When:
    final KGroupedStreamHolder result = builder.build(streamHolder, groupByKey);
    // Then:
    assertThat(result.getSchema(), is(SCHEMA));
}
Also used : KGroupedStreamHolder(io.confluent.ksql.execution.plan.KGroupedStreamHolder) Test(org.junit.Test)

Example 5 with KGroupedStreamHolder

use of io.confluent.ksql.execution.plan.KGroupedStreamHolder in project ksql by confluentinc.

the class StreamGroupByBuilderTest method shouldPerformGroupByKeyCorrectly.

@Test
public void shouldPerformGroupByKeyCorrectly() {
    // When:
    final KGroupedStreamHolder result = builder.build(streamHolder, groupByKey);
    // Then:
    assertThat(result.getGroupedStream(), is(groupedStream));
    verify(sourceStream).groupByKey(grouped);
    verifyNoMoreInteractions(sourceStream);
}
Also used : KGroupedStreamHolder(io.confluent.ksql.execution.plan.KGroupedStreamHolder) Test(org.junit.Test)

Aggregations

KGroupedStreamHolder (io.confluent.ksql.execution.plan.KGroupedStreamHolder)9 Test (org.junit.Test)8 GenericKey (io.confluent.ksql.GenericKey)1 GenericRow (io.confluent.ksql.GenericRow)1 CodeGenRunner (io.confluent.ksql.execution.codegen.CodeGenRunner)1 CompiledExpression (io.confluent.ksql.execution.codegen.CompiledExpression)1 QueryContext (io.confluent.ksql.execution.context.QueryContext)1 Expression (io.confluent.ksql.execution.expression.tree.Expression)1 Formats (io.confluent.ksql.execution.plan.Formats)1 KStreamHolder (io.confluent.ksql.execution.plan.KStreamHolder)1 StreamGroupByKey (io.confluent.ksql.execution.plan.StreamGroupByKey)1 RuntimeBuildContext (io.confluent.ksql.execution.runtime.RuntimeBuildContext)1 ProcessingLogger (io.confluent.ksql.logging.processing.ProcessingLogger)1 LogicalSchema (io.confluent.ksql.schema.ksql.LogicalSchema)1 PhysicalSchema (io.confluent.ksql.schema.ksql.PhysicalSchema)1 List (java.util.List)1 Objects.requireNonNull (java.util.Objects.requireNonNull)1 Serde (org.apache.kafka.common.serialization.Serde)1 Grouped (org.apache.kafka.streams.kstream.Grouped)1 KGroupedStream (org.apache.kafka.streams.kstream.KGroupedStream)1