use of io.confluent.ksql.execution.plan.TableSource 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);
}
use of io.confluent.ksql.execution.plan.TableSource in project ksql by confluentinc.
the class StepSchemaResolverTest method shouldResolveSchemaForTableSource.
@Test
public void shouldResolveSchemaForTableSource() {
// Given:
final TableSource step = new TableSource(PROPERTIES, "foo", formats, Optional.empty(), SCHEMA, SystemColumns.CURRENT_PSEUDOCOLUMN_VERSION_NUMBER, formats);
// When:
final LogicalSchema result = resolver.resolve(step, SCHEMA);
// Then:
assertThat(result, is(SCHEMA.withPseudoAndKeyColsInValue(false)));
}
use of io.confluent.ksql.execution.plan.TableSource in project ksql by confluentinc.
the class SourceBuilder method getPhysicalSchemaWithPseudoColumnsToMaterialize.
private static PhysicalSchema getPhysicalSchemaWithPseudoColumnsToMaterialize(final SourceStep<?> streamSource) {
final Formats format = ((TableSource) streamSource).getStateStoreFormats();
final LogicalSchema withPseudoCols = streamSource.getSourceSchema().withPseudoColumnsToMaterialize(streamSource.getPseudoColumnVersion());
return PhysicalSchema.from(withPseudoCols, format.getKeyFeatures(), format.getValueFeatures());
}
use of io.confluent.ksql.execution.plan.TableSource 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);
}
use of io.confluent.ksql.execution.plan.TableSource in project ksql by confluentinc.
the class PlanInfoExtractorTest method setUp.
@Before
public void setUp() {
streamSource = new StreamSource(new ExecutionStepPropertiesV1(queryContext), "s1", formats, Optional.empty(), schema, OptionalInt.of(SystemColumns.CURRENT_PSEUDOCOLUMN_VERSION_NUMBER));
tableSource = new TableSource(new ExecutionStepPropertiesV1(queryContext), "t1", formats, Optional.empty(), schema, SystemColumns.CURRENT_PSEUDOCOLUMN_VERSION_NUMBER, formats);
streamSourceRepartitioned = new StreamSelectKey<>(new ExecutionStepPropertiesV1(queryContext), streamSource, ImmutableList.of(repartitionKey));
streamAndTableJoined = new StreamTableJoin<>(new ExecutionStepPropertiesV1(queryContext), JoinType.LEFT, joinKey, formats, streamSource, tableSource);
streamRepartitionedAndTableJoined = new StreamTableJoin<>(new ExecutionStepPropertiesV1(queryContext), JoinType.LEFT, joinKey, formats, streamSourceRepartitioned, tableSource);
streamAndTableJoinedRepartitioned = new StreamSelectKey<>(new ExecutionStepPropertiesV1(queryContext), streamAndTableJoined, ImmutableList.of(repartitionKey));
planInfoExtractor = new PlanInfoExtractor();
}
Aggregations