Hi Flink Community,
We use Flink SQL to calculate some metrics. In our SQL, we use window aggregation and we want to trigger the result earlier with different trigger strategies.
So we get the window operators in the transformations and set the triggers by reflection.
It worked in Flink 1.7. But when we upgrade to Flink SQL 1.10+, we find the 'getOperator' method of the OneInputTransformation has been changed from
public OneInputStreamOperator<IN, OUT> getOperator() {
return operator;
}
to
public OneInputStreamOperator<IN, OUT> getOperator() {
return (OneInputStreamOperator<IN, OUT>) ((SimpleOperatorFactory) operatorFactory).getOperator();
}
In one of our OneInputTransformations, the operatorFactory is AsyncWaitOperatorFactory. When we call the getOperator method, it will throw
org.apache.flink.streaming.api.operators.async.AsyncWaitOperatorFactory cannot be cast to org.apache.flink.streaming.api.operators.SimpleOperatorFactory
Can we know why only cast the operatorFactory to SimpleOperatorFactory? Does it make sense that we should check the type of operatorFactory when we call this method?