You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/07/02 04:03:01 UTC

[GitHub] [flink] JingsongLi commented on a change in pull request #12803: [FLINK-18461][table-planner-blink] Fix Changelog source can't be insert into upsert sink

JingsongLi commented on a change in pull request #12803:
URL: https://github.com/apache/flink/pull/12803#discussion_r448735672



##########
File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/optimize/program/FlinkChangelogModeInferenceProgram.scala
##########
@@ -66,15 +66,29 @@ class FlinkChangelogModeInferenceProgram extends FlinkOptimizeProgram[StreamOpti
       // try ONLY_UPDATE_AFTER first, and then BEFORE_AND_AFTER
       Seq(UpdateKindTrait.ONLY_UPDATE_AFTER, UpdateKindTrait.BEFORE_AND_AFTER)
     }
+    var throwable: Throwable = null
     val finalRoot = requiredUpdateKindTraits.flatMap { requiredUpdateKindTrait =>
-      SATISFY_UPDATE_KIND_TRAIT_VISITOR.visit(rootWithModifyKindSet, requiredUpdateKindTrait)
+      try {
+        SATISFY_UPDATE_KIND_TRAIT_VISITOR.visit(rootWithModifyKindSet, requiredUpdateKindTrait)
+      } catch {
+        case t: Throwable =>
+          // cache exception and return None to

Review comment:
       Should add some comments to explain when/which node will throw exception?




----------------------------------------------------------------
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:
users@infra.apache.org