use of org.apache.flink.table.runtime.operators.wmassigners.ProcTimeMiniBatchAssignerOperator in project flink by apache.
the class StreamExecMiniBatchAssigner method translateToPlanInternal.
@SuppressWarnings("unchecked")
@Override
protected Transformation<RowData> translateToPlanInternal(PlannerBase planner, ExecNodeConfig config) {
final Transformation<RowData> inputTransform = (Transformation<RowData>) getInputEdges().get(0).translateToPlan(planner);
final OneInputStreamOperator<RowData, RowData> operator;
if (miniBatchInterval.getMode() == MiniBatchMode.ProcTime) {
operator = new ProcTimeMiniBatchAssignerOperator(miniBatchInterval.getInterval());
} else if (miniBatchInterval.getMode() == MiniBatchMode.RowTime) {
operator = new RowTimeMiniBatchAssginerOperator(miniBatchInterval.getInterval());
} else {
throw new TableException(String.format("MiniBatchAssigner shouldn't be in %s mode this is a bug, please file an issue.", miniBatchInterval.getMode()));
}
return ExecNodeUtil.createOneInputTransformation(inputTransform, createTransformationMeta(MINI_BATCH_ASSIGNER_TRANSFORMATION, config), operator, InternalTypeInfo.of(getOutputType()), inputTransform.getParallelism());
}
Aggregations