cshuo 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_r354677891
########## 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: IIUC, for the case that there is only group aggregation with a **redundant watermark** defined in the sql job, minibatch will not worked even when the user set `table.exec.mini-batch.enabled = true`, which confuses users as this is transparent to them. I'm wondering if some checks can be added to alert user? ---------------------------------------------------------------- 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