pnowojski commented on a change in pull request #8295: [FLINK-11974][runtime] 
Introduce StreamOperatorFactory
URL: https://github.com/apache/flink/pull/8295#discussion_r280472961
 
 

 ##########
 File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/OneInputOperatorWrapper.java
 ##########
 @@ -52,7 +53,9 @@ public 
OneInputOperatorWrapper(GeneratedClass<OneInputStreamOperator<IN, OUT>> g
        public void setup(StreamTask<?, ?> containingTask, StreamConfig config,
                        Output<StreamRecord<OUT>> output) {
                operator = 
generatedClass.newInstance(containingTask.getUserCodeClassLoader());
-               operator.setup(containingTask, config, output);
+               if (operator instanceof SetupableStreamOperator) {
+                       ((SetupableStreamOperator) 
operator).setup(containingTask, config, output);
 
 Review comment:
   Would it be viable to migrate this already to the non setupable operator? So 
to replace this if check with:
   ```
   operator = 
generatedClass.newInstance(containingTask.getUserCodeClassLoader(), 
containingTask, config, output);
   ```
   ?
   
   If it's non trivial it could be done as some kind of follow up step.

----------------------------------------------------------------
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

Reply via email to