jeyhunkarimov commented on code in PR #23470:
URL: https://github.com/apache/flink/pull/23470#discussion_r1451763129
##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/optimize/StreamCommonSubGraphBasedOptimizer.scala:
##########
@@ -50,14 +51,23 @@ class StreamCommonSubGraphBasedOptimizer(planner:
StreamPlanner)
val tableConfig = planner.getTableConfig
// build RelNodeBlock plan
val sinkBlocks = RelNodeBlockPlanBuilder.buildRelNodeBlockPlan(roots,
tableConfig)
+ val miniBatchRequirementChecker = {
+ (node: RelNode) =>
+ node.isInstanceOf[Filter] ||
+ node.isInstanceOf[Project] ||
+ node.isInstanceOf[TableScan] ||
+ (node.isInstanceOf[LogicalUnion] &&
node.asInstanceOf[LogicalUnion].all)
+ }
// infer trait properties for sink block
sinkBlocks.foreach {
sinkBlock =>
// don't require update before by default
sinkBlock.setUpdateBeforeRequired(false)
-
val miniBatchInterval: MiniBatchInterval =
- if
(tableConfig.get(ExecutionConfigOptions.TABLE_EXEC_MINIBATCH_ENABLED)) {
+ if (
+
tableConfig.get(ExecutionConfigOptions.TABLE_EXEC_MINIBATCH_ENABLED) &&
+ !sinkBlock.containsAll(miniBatchRequirementChecker)
Review Comment:
Agreed. Also, I moved the mini-batch skipping logic from `RelnodeBlock` to
`StreamCommonSubGraphBasedOptimizer:: shouldSkipMiniBatch`.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]