gustavodemorais commented on code in PR #30173:
URL: https://github.com/apache/flink/pull/30173#discussion_r4721783562


##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/optimize/program/FlinkChangelogModeInferenceProgram.scala:
##########
@@ -1786,6 +1889,22 @@ class FlinkChangelogModeInferenceProgram extends 
FlinkOptimizeProgram[StreamOpti
     }
   }
 
+  /**
+   * Whether the drop of retractions can move below the operator (see 
`dropRetractions`). This holds
+   * if the operator handles each row on its own and keeps no state: it 
doesn't need the retractions
+   * of its input and creates none of its own, so a function above it that 
ignores retractions (see
+   * [[StaticArgumentTrait.IGNORE_RETRACTIONS]]) ignores those of its input 
too.
+   *
+   * DropUpdateBefore needs no such list: in the update-kind pass, every 
operator states whether it
+   * needs UPDATE_BEFORE. The delete-kind pass has no requirement for "deletes 
not needed".
+   */
+  private def canPushDropBelow(rel: RelNode): Boolean = rel match {
+    case _: StreamPhysicalCalcBase | _: StreamPhysicalExchange | _: 
StreamPhysicalExpand |
+        _: StreamPhysicalMiniBatchAssigner | _: StreamPhysicalUnion =>

Review Comment:
   Both StreamPhysicalExpand and MiniBatcher are semantically correct to keep 
here but very unlikely to be reached in practice and I'll just drop both for now



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

Reply via email to