wuchong commented on a change in pull request #12803:
URL: https://github.com/apache/flink/pull/12803#discussion_r448790304
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/optimize/program/FlinkChangelogModeInferenceProgram.scala
##########
@@ -687,9 +701,24 @@ class FlinkChangelogModeInferenceProgram extends
FlinkOptimizeProgram[StreamOpti
private def visitSink(
sink: StreamPhysicalRel,
sinkRequiredTraits: Seq[UpdateKindTrait]): Option[StreamPhysicalRel] =
{
- val children = sinkRequiredTraits.flatMap(t => visitChildren(sink, t))
+ var throwable: Throwable = null
+ val children = sinkRequiredTraits.flatMap { t =>
+ try {
+ visitChildren(sink, t)
Review comment:
The return type of `visitChildren` is already `Option`. The
`visitChildren` should throw exception if anything is wrong, because the
underlying exception should be known by the users in some cases (e.g. unsupport
exception when changelog source emit UPDATE_AFTER without UPDATE_BEFORE). The
fallback logic belongs to who has multiple required traits.
----------------------------------------------------------------
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]