use of io.confluent.ksql.physical.scalablepush.operators.PeekStreamOperator in project ksql by confluentinc.
the class PushPhysicalPlanBuilder method translateDataSourceNode.
private AbstractPhysicalOperator translateDataSourceNode(final DataSourceNode logicalNode, final Optional<PushOffsetRange> offsetRange, final String catchupConsumerGroupId) {
final ScalablePushRegistry scalablePushRegistry = persistentQueryMetadata.getScalablePushRegistry().orElseThrow(() -> new IllegalStateException("Scalable push registry cannot be found"));
querySourceType = logicalNode.isWindowed() ? QuerySourceType.WINDOWED : QuerySourceType.NON_WINDOWED;
final Optional<CatchupMetadata> catchupMetadata = offsetRange.map(or -> new CatchupMetadata(or, catchupConsumerGroupId));
return new PeekStreamOperator(scalablePushRegistry, logicalNode, queryId, catchupMetadata);
}
Aggregations