wenlong88 commented on a change in pull request #14916:
URL: https://github.com/apache/flink/pull/14916#discussion_r636710268



##########
File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/LogicalCorrelateToJoinFromTemporalTableFunctionRule.scala
##########
@@ -155,6 +155,7 @@ class LogicalCorrelateToJoinFromTemporalTableFunctionRule
     case hep: HepRelVertex => getRelOptSchema(hep.getCurrentRel)
     case single: SingleRel => getRelOptSchema(single.getInput)
     case bi: BiRel => getRelOptSchema(bi.getLeft)
+    case union: Union => getRelOptSchema(union.getInput(0))

Review comment:
       I think this fix still not completed, there are still some other 
RelNodes would cause NPE, the fix like following may be better, what do you 
think?
       case relNode: RelNode if relNode.getInputs.isEmpty => 
relNode.getTable.getRelOptSchema
       case _ => getRelOptSchema(relNode.getInput(0))




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


Reply via email to