wuchong commented on a change in pull request #10316: [FLINK-14624][table-blink] Support computed column as rowtime attribute URL: https://github.com/apache/flink/pull/10316#discussion_r354094955
########## File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamExecMiniBatchAssigner.scala ########## @@ -0,0 +1,131 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.table.planner.plan.nodes.physical.stream + +import org.apache.calcite.plan.{RelOptCluster, RelTraitSet} +import org.apache.calcite.rel.{RelNode, RelWriter, SingleRel} +import org.apache.flink.api.dag.Transformation +import org.apache.flink.streaming.api.transformations.OneInputTransformation +import org.apache.flink.table.api.TableException +import org.apache.flink.table.api.config.ExecutionConfigOptions +import org.apache.flink.table.dataformat.BaseRow +import org.apache.flink.table.planner.calcite.{FlinkContext, FlinkTypeFactory} +import org.apache.flink.table.planner.delegation.StreamPlanner +import org.apache.flink.table.planner.plan.`trait`.{MiniBatchIntervalTraitDef, MiniBatchMode} +import org.apache.flink.table.planner.plan.nodes.exec.{ExecNode, StreamExecNode} +import org.apache.flink.table.planner.utils.TableConfigUtils.getMillisecondFromConfigDuration +import org.apache.flink.table.runtime.operators.wmassigners.MiniBatchAssignerOperator +import org.apache.flink.table.runtime.typeutils.BaseRowTypeInfo +import org.apache.flink.util.Preconditions + +import java.util + +import scala.collection.JavaConversions._ + +/** + * Stream physical RelNode for injecting a mini-batch event in the streaming data. The mini-batch + * event will be recognized as a boundary between two mini-batches. The following operators will + * keep track of the mini-batch events and trigger mini-batch once the mini-batch id is advanced. + * + * NOTE: currently, we leverage the runtime watermark mechanism to achieve the mini-batch, because + * runtime doesn't support customized events and the watermark mechanism fully meets mini-batch + * needs. + */ +class StreamExecMiniBatchAssigner( + cluster: RelOptCluster, + traits: RelTraitSet, + inputRel: RelNode) + extends SingleRel(cluster, traits, inputRel) + with StreamPhysicalRel + with StreamExecNode[BaseRow] { + + override def producesUpdates: Boolean = false + + override def needsUpdatesAsRetraction(input: RelNode): Boolean = false + + override def consumesRetractions: Boolean = false Review comment: you are right. ---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
