JingsongLi commented on a change in pull request #11387: 
[FLINK-16343][table-planner-blink] Improve exception message when reading an 
unbounded source in batch mode
URL: https://github.com/apache/flink/pull/11387#discussion_r391446533
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/schema/CatalogSourceTable.scala
 ##########
 @@ -164,10 +164,21 @@ class CatalogSourceTable[T](
     } else {
       TableFactoryUtil.findAndCreateTableSource(context)
     }
+
     if (!tableSource.isInstanceOf[StreamTableSource[_]]) {
       throw new TableException("Catalog tables support only "
         + "StreamTableSource and InputFormatTableSource")
     }
+
+    // validate TableSource when it is in batch mode
+    if (!schemaTable.isStreamingMode) {
 
 Review comment:
   Why not add this to `BatchExecTableSourceScanRule`?

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


With regards,
Apache Git Services

Reply via email to