rkhachatryan commented on a change in pull request #11403: [FLINK-16316][operators] Implement new StreamOperatorBase as a replacement for AbstractStreamOperator URL: https://github.com/apache/flink/pull/11403#discussion_r393258181
########## File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/StreamOperatorFactory.java ########## @@ -32,14 +30,13 @@ * * @param <OUT> The output type of the operator */ -@Internal +@PublicEvolving public interface StreamOperatorFactory<OUT> extends Serializable { /** * Create the operator. Sets access to the context and the output. */ - <T extends StreamOperator<OUT>> T createStreamOperator( - StreamTask<?, ?> containingTask, StreamConfig config, Output<StreamRecord<OUT>> output); + <T extends StreamOperator<OUT>> T createStreamOperator(StreamOperatorInitializer<OUT> initializer); Review comment: Why do we allow client to specify return type (`T`)? IMO, it's a factory who knows what it creates, except for strange cases of `SimpleOperatorFactory` and `CodeGenOperatorFactory` :) I see two options: 1. parameterize `StreamOperatorFactory` with the return type (I tried - too many changes) 1. return `StreamOperator<OUT>` and move cast to the client; this is less casts and IMO confusion ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services