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_r354726435
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/physical/stream/MiniBatchIntervalInferRule.scala
 ##########
 @@ -120,9 +116,22 @@ class MiniBatchIntervalInferRule extends RelOptRule(
     }
   }
 
-  private def isTableSourceScan(node: RelNode): Boolean = node match {
-    case _: StreamExecDataStreamScan | _: StreamExecTableSourceScan => true
-    case _ => false
+  private def shouldAppendMiniBatchAssignerNode(node: RelNode): Boolean = {
+    val mode = node.getTraitSet
+      .getTrait(MiniBatchIntervalTraitDef.INSTANCE)
+      .getMiniBatchInterval
+      .mode
+    node match {
+      case _: StreamExecDataStreamScan | _: StreamExecTableSourceScan =>
+        // append minibatch node if the mode is not NONE and reach a source 
leaf node
+        mode == MiniBatchMode.RowTime || mode == MiniBatchMode.ProcTime
+      case _: StreamExecWatermarkAssigner  =>
 
 Review comment:
   Good catch! We can still append mini-batch node after watermark node if it 
is proctime mode, because proctime minibatch assginer will override upstream 
watermarks. I updated the code. 

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

Reply via email to