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/03/12 09:38:37 UTC

[GitHub] [flink] wuchong commented on a change in pull request #11387: [FLINK-16343][table-planner-blink] Improve exception message when reading an unbounded source in batch mode

wuchong 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_r391499339
 
 

 ##########
 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:
   My initial thought is "fail-fast", throw the exception at ealier stage, just like the above validation which only allows `StreamTableSource` and `InputFormatTableSource`.

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


With regards,
Apache Git Services