Github user twalthr commented on a diff in the pull request: https://github.com/apache/flink/pull/6201#discussion_r198154676 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/PhysicalTableSourceScan.scala --- @@ -39,9 +39,12 @@ abstract class PhysicalTableSourceScan( override def deriveRowType(): RelDataType = { val flinkTypeFactory = cluster.getTypeFactory.asInstanceOf[FlinkTypeFactory] - val streamingTable = table.unwrap(classOf[TableSourceTable[_]]) match { - case _: StreamTableSourceTable[_] => true - case _: BatchTableSourceTable[_] => false + val streamingTable = table.unwrap(classOf[TableSourceSinkTable[_, _]]) match { + case t: TableSourceSinkTable[_, _] => t.tableSourceTableOpt match { + case _: StreamTableSourceTable[_] => true --- End diff -- The pattern are incorrect since the method returns an option.
---