Search in sources :

Example 6 with ExecutionStepPropertiesV1

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

the class SourceBuilderV1Test method givenMultiColumnSourceStream.

private void givenMultiColumnSourceStream(final int pseudoColumnVersion) {
    when(buildContext.buildKeySerde(any(), any(), any())).thenReturn(keySerde);
    givenConsumed(consumed, keySerde);
    streamSource = new StreamSource(new ExecutionStepPropertiesV1(ctx), TOPIC_NAME, Formats.of(keyFormatInfo, valueFormatInfo, KEY_FEATURES, VALUE_FEATURES), TIMESTAMP_COLUMN, MULTI_COL_SOURCE_SCHEMA, OptionalInt.of(pseudoColumnVersion));
}
Also used : WindowedStreamSource(io.confluent.ksql.execution.plan.WindowedStreamSource) StreamSource(io.confluent.ksql.execution.plan.StreamSource) ExecutionStepPropertiesV1(io.confluent.ksql.execution.plan.ExecutionStepPropertiesV1)

Example 7 with ExecutionStepPropertiesV1

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

the class SourceBuilderV1Test method givenWindowedSourceTable.

private void givenWindowedSourceTable(final int pseudoColumnVersion) {
    when(buildContext.buildKeySerde(any(), any(), any(), any())).thenReturn(windowedKeySerde);
    givenConsumed(consumedWindowed, windowedKeySerde);
    givenConsumed(consumedWindowed, windowedKeySerde);
    windowedTableSource = new WindowedTableSource(new ExecutionStepPropertiesV1(ctx), TOPIC_NAME, Formats.of(keyFormatInfo, valueFormatInfo, KEY_FEATURES, VALUE_FEATURES), windowInfo, TIMESTAMP_COLUMN, SOURCE_SCHEMA, OptionalInt.of(pseudoColumnVersion));
}
Also used : ExecutionStepPropertiesV1(io.confluent.ksql.execution.plan.ExecutionStepPropertiesV1) WindowedTableSource(io.confluent.ksql.execution.plan.WindowedTableSource)

Example 8 with ExecutionStepPropertiesV1

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

the class SourceBuilderTest method givenUnwindowedSourceTable.

private void givenUnwindowedSourceTable() {
    when(buildContext.buildKeySerde(any(), any(), any())).thenReturn(keySerde);
    givenConsumed(consumed, keySerde);
    tableSource = new TableSource(new ExecutionStepPropertiesV1(ctx), TOPIC_NAME, formats, TIMESTAMP_COLUMN, SOURCE_SCHEMA, SystemColumns.ROWPARTITION_ROWOFFSET_PSEUDOCOLUMN_VERSION, formats);
}
Also used : TableSource(io.confluent.ksql.execution.plan.TableSource) ExecutionStepPropertiesV1(io.confluent.ksql.execution.plan.ExecutionStepPropertiesV1)

Example 9 with ExecutionStepPropertiesV1

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

the class PlanSummaryTest method givenStep.

private void givenStep(final ExecutionStep<?> step, final String ctx, final LogicalSchema schema, final ExecutionStep<?>... sources) {
    final ExecutionStepPropertiesV1 props = mock(ExecutionStepPropertiesV1.class);
    when(step.getProperties()).thenReturn(props);
    when(props.getQueryContext()).thenReturn(new QueryContext.Stacker().push(ctx).getQueryContext());
    when(schemaResolver.resolve(same(step), any())).thenReturn(schema);
    when(schemaResolver.resolve(same(step), any(), any())).thenReturn(schema);
    when(step.getSources()).thenReturn(Arrays.asList(sources));
}
Also used : ExecutionStepPropertiesV1(io.confluent.ksql.execution.plan.ExecutionStepPropertiesV1) QueryContext(io.confluent.ksql.execution.context.QueryContext)

Example 10 with ExecutionStepPropertiesV1

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

the class SourceBuilderTest method givenMultiColumnSourceTable.

private void givenMultiColumnSourceTable() {
    when(buildContext.buildKeySerde(any(), any(), any())).thenReturn(keySerde);
    givenConsumed(consumed, keySerde);
    tableSource = new TableSource(new ExecutionStepPropertiesV1(ctx), TOPIC_NAME, formats, TIMESTAMP_COLUMN, MULTI_COL_SOURCE_SCHEMA, SystemColumns.ROWPARTITION_ROWOFFSET_PSEUDOCOLUMN_VERSION, formats);
}
Also used : TableSource(io.confluent.ksql.execution.plan.TableSource) ExecutionStepPropertiesV1(io.confluent.ksql.execution.plan.ExecutionStepPropertiesV1)

Aggregations

ExecutionStepPropertiesV1 (io.confluent.ksql.execution.plan.ExecutionStepPropertiesV1)18 Before (org.junit.Before)6 Named (org.apache.kafka.streams.kstream.Named)5 Materialized (org.apache.kafka.streams.kstream.Materialized)4 GenericKey (io.confluent.ksql.GenericKey)3 StreamSource (io.confluent.ksql.execution.plan.StreamSource)3 StreamWindowedAggregate (io.confluent.ksql.execution.plan.StreamWindowedAggregate)3 TableSource (io.confluent.ksql.execution.plan.TableSource)3 WindowedStreamSource (io.confluent.ksql.execution.plan.WindowedStreamSource)3 WindowTimeClause (io.confluent.ksql.execution.windows.WindowTimeClause)3 KeyValueStore (org.apache.kafka.streams.state.KeyValueStore)2 QueryContext (io.confluent.ksql.execution.context.QueryContext)1 PlanInfoExtractor (io.confluent.ksql.execution.plan.PlanInfoExtractor)1 StreamAggregate (io.confluent.ksql.execution.plan.StreamAggregate)1 StreamSelectKeyV1 (io.confluent.ksql.execution.plan.StreamSelectKeyV1)1 TableAggregate (io.confluent.ksql.execution.plan.TableAggregate)1 TableSourceV1 (io.confluent.ksql.execution.plan.TableSourceV1)1 WindowedTableSource (io.confluent.ksql.execution.plan.WindowedTableSource)1 HoppingWindowExpression (io.confluent.ksql.execution.windows.HoppingWindowExpression)1 SessionWindowExpression (io.confluent.ksql.execution.windows.SessionWindowExpression)1